[FIX] sale: Wrong access_name button in Sales Order - Send by Email
When the online SO was already confirmed and paid, the button "Accept and pay" was displayed instead of "View". opw:728306
This commit is contained in:
@@ -18,7 +18,7 @@
|
||||
% set access_action = object.with_context(force_website=True).get_access_action()
|
||||
% set doc_name = 'quotation' if object.state in ('draft', 'sent') else 'order confirmation'
|
||||
% set is_online = access_action and access_action['type'] == 'ir.actions.act_url'
|
||||
% set access_name = is_online and object.template_id and 'Accept and pay %s online' % doc_name or 'View %s' % doc_name
|
||||
% set access_name = is_online and object.template_id and doc_name == 'quotation' and 'Accept and pay %s online' % doc_name or 'View %s' % doc_name
|
||||
% set access_url = is_online and access_action['url'] or None
|
||||
|
||||
% if object.partner_id.parent_id:
|
||||
|
||||
Reference in New Issue
Block a user