[IMP] sale,sale_journal,stock,mrp:improved log messages and solved installation error in mrp
bzr revid: mtr@mtr-20100615054829-pmpsick12pbf2hlr
This commit is contained in:
parent
152ee4740d
commit
3ede9fb751
|
@ -84,7 +84,7 @@
|
|||
|
||||
|
||||
],
|
||||
'demo_xml': ['mrp_demo.xml', 'mrp_order_point.xml','board_manufacturing_demo.xml'],
|
||||
'demo_xml': ['mrp_demo.xml', 'board_manufacturing_demo.xml'],
|
||||
'test': [
|
||||
'test/mrp_phantom_bom.yml',
|
||||
'test/mrp_production_order.yml',
|
||||
|
|
|
@ -14,7 +14,6 @@
|
|||
<hpaned position="100">
|
||||
<child1>
|
||||
<action colspan="4" height="200" name="%(mrp.mrp_production_action2)d" string="Next production orders" width="510"/>
|
||||
<action colspan="4" name="%(mrp_procurement.mrp_procurement_action4)d" string="Procurements in Exception"/>
|
||||
<action colspan="4" name="%(stock.action_picking_tree)d" string="Deliveries (Out picking)" domain="[('state','=','assigned'),('type','=','out')]"/>
|
||||
<action colspan="4" name="%(procurement.procurement_action4)d" string="Procurements in Exception"/>
|
||||
</child1>
|
||||
|
|
|
@ -331,7 +331,7 @@ class sale_order(osv.osv):
|
|||
# Deleting the existing instance of workflow for SO
|
||||
wf_service.trg_delete(uid, 'sale.order', inv_id, cr)
|
||||
wf_service.trg_create(uid, 'sale.order', inv_id, cr)
|
||||
for (id,name) in self.name_get(cr, uid, id):
|
||||
for (id,name) in self.name_get(cr, uid, ids):
|
||||
message = _('Sale order ') + " '" + name + "' "+ _("is in draft state")
|
||||
self.log(cr, uid, id, message)
|
||||
return True
|
||||
|
@ -553,9 +553,8 @@ class sale_order(osv.osv):
|
|||
sale_order_line_obj.write(cr, uid, [l.id for l in sale.order_line],
|
||||
{'state': 'cancel'})
|
||||
self.write(cr, uid, ids, {'state': 'cancel'})
|
||||
for line in sale.order_line:
|
||||
message = _('Sale order') + " '" + sale.name + "' "+ _("created on")+" '" +sale.create_date + _(" is cancelled")
|
||||
self.log(cr, uid, id, message)
|
||||
message = _('Sale order') + " '" + sale.name + "' "+ _("created on")+" '" +sale.create_date + _(" is cancelled")
|
||||
self.log(cr, uid, id, message)
|
||||
return True
|
||||
|
||||
def action_wait(self, cr, uid, ids, *args):
|
||||
|
|
|
@ -70,6 +70,9 @@ class sale_journal(osv.osv):
|
|||
for saleid in sale_ids:
|
||||
wf_service = netsvc.LocalService("workflow")
|
||||
wf_service.trg_validate(uid, 'sale.order', saleid, 'cancel', cr)
|
||||
for (id,name) in self.name_get(cr, uid, ids):
|
||||
message = _('Sale order of Journal') + " '" + name + "' "+ _("is cancelled")
|
||||
self.log(cr, uid, id, message)
|
||||
return True
|
||||
|
||||
def button_sale_confirm(self, cr, uid, ids, context={}):
|
||||
|
@ -79,28 +82,28 @@ class sale_journal(osv.osv):
|
|||
wf_service = netsvc.LocalService("workflow")
|
||||
wf_service.trg_validate(uid, 'sale.order', saleid, 'order_confirm', cr)
|
||||
for (id,name) in self.name_get(cr, uid, ids):
|
||||
message = _('Sale Journal') + " '" + name + "' "+ _("is confirmed")
|
||||
message = _('Sale orders of Journal') + " '" + name + "' "+ _("is confirmed")
|
||||
self.log(cr, uid, id, message)
|
||||
return True
|
||||
|
||||
def button_open(self, cr, uid, ids, context={}):
|
||||
self.write(cr, uid, ids, {'state':'open'})
|
||||
for (id,name) in self.name_get(cr, uid, ids):
|
||||
message = _('Sale Journal') + " '" + name + "' "+ _("is opened")
|
||||
message = _('Sale orders of Journal') + " '" + name + "' "+ _("is opened")
|
||||
self.log(cr, uid, id, message)
|
||||
return True
|
||||
|
||||
def button_draft(self, cr, uid, ids, context={}):
|
||||
self.write(cr, uid, ids, {'state':'draft'})
|
||||
for (id,name) in self.name_get(cr, uid, ids):
|
||||
message = _('Sale Journal') + " '" + name + "' "+ _("is in draft state")
|
||||
message = _('Sale orders of Journal') + " '" + name + "' "+ _("is in draft state")
|
||||
self.log(cr, uid, id, message)
|
||||
return True
|
||||
|
||||
def button_close(self, cr, uid, ids, context={}):
|
||||
self.write(cr, uid, ids, {'state':'done', 'date_validation':time.strftime('%Y-%m-%d')})
|
||||
for (id,name) in self.name_get(cr, uid, ids):
|
||||
message = _('Sale Journal') + " '" + name + "' "+ _("is closed")
|
||||
message = _('Sale orders of Journal') + " '" + name + "' "+ _("is closed")
|
||||
self.log(cr, uid, id, message)
|
||||
return True
|
||||
|
||||
|
|
|
@ -759,6 +759,8 @@ class stock_picking(osv.osv):
|
|||
ids2 = [move.id for move in pick.move_lines]
|
||||
self.pool.get('stock.move').action_cancel(cr, uid, ids2, context)
|
||||
self.write(cr, uid, ids, {'state': 'cancel', 'invoice_state': 'none'})
|
||||
message = _('Picking') + " '" + pick.name + "' "+_("is cancelled")
|
||||
self.log(cr, uid, id, message)
|
||||
return True
|
||||
|
||||
#
|
||||
|
@ -1815,9 +1817,9 @@ class stock_move(osv.osv):
|
|||
for pick in picking_obj.browse(cr, uid, picking_ids):
|
||||
if all(move.state == 'done' for move in pick.move_lines):
|
||||
picking_obj.action_done(cr, uid, [pick.id])
|
||||
for (id,name) in picking_obj.name_get(cr, uid, [pick.id]):
|
||||
message = _('Picking ') + " '" + name + "' "+ _("is processed")
|
||||
self.log(cr, uid, id, message)
|
||||
for (id,name) in picking_obj.name_get(cr, uid, picking_ids):
|
||||
message = _('Picking ') + " '" + name + "' "+ _("is processed")
|
||||
self.log(cr, uid, id, message)
|
||||
wf_service = netsvc.LocalService("workflow")
|
||||
for id in ids:
|
||||
wf_service.trg_trigger(uid, 'stock.move', id, cr)
|
||||
|
|
Loading…
Reference in New Issue