[FIX] purchase: solved issue of PO not goes in sent state
bzr revid: cha@tinyerp.com-20121123062618-r3klopmt0b3czczt
This commit is contained in:
parent
698f50daca
commit
17bb9448ba
|
@ -44,7 +44,7 @@
|
|||
% if object.partner_ref:
|
||||
Your reference: ${object.partner_ref}<br />
|
||||
% endif
|
||||
% if object.user_id:
|
||||
% if object.validator:
|
||||
Your contact: <a href="mailto:${object.validator.email or ''}?subject=Order%20${object.name}">${object.validator.name}</a>
|
||||
% endif
|
||||
</p>
|
||||
|
|
|
@ -1168,4 +1168,13 @@ class product_template(osv.osv):
|
|||
|
||||
product_template()
|
||||
|
||||
class mail_compose_message(osv.osv):
|
||||
_inherit = 'mail.compose.message'
|
||||
def send_mail(self, cr, uid, ids, context=None):
|
||||
context = context or {}
|
||||
if context.get('default_model') == 'purchase.order' and context.get('default_res_id'):
|
||||
wf_service = netsvc.LocalService("workflow")
|
||||
wf_service.trg_validate(uid, 'purchase.order', context['default_res_id'], 'send_rfq', cr)
|
||||
return super(mail_compose_message, self).send_mail(cr, uid, ids, context=context)
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
Loading…
Reference in New Issue