Rename check_adresses into check_for_quotation to allow more check
This commit is contained in:
1 parent
0a257725c9
commit
7797bee502
2 files changed
+2
-2
No files matched your search
+1
-1
@@ -602,7 +602,7 @@ class Purchase(OSV):
|
||||
return super(Purchase, self).copy(cursor, user, purchase_id,
|
||||
default=default, context=context)
|
||||
|
||||
def check_adresses(self, cursor, user, purchase_id, context=None):
|
||||
def check_for_quotation(self, cursor, user, purchase_id, context=None):
|
||||
purchase = self.browse(cursor, user, purchase_id, context=context)
|
||||
if not (purchase.invoice_address and purchase.contact_address):
|
||||
self.raise_user_error(cursor, 'addresses_required', context=context)
|
||||
|
||||
+1
-1
@@ -247,7 +247,7 @@ this repository contains the full copyright notices and license terms. -->
|
||||
<field name="name">Quotation</field>
|
||||
<field name="workflow" ref="purchase_workflow"/>
|
||||
<field name="kind">function</field>
|
||||
<field name="action">check_adresses() set_reference() write({'state': 'quotation'})</field>
|
||||
<field name="action">check_for_quotation() set_reference() write({'state': 'quotation'})</field>
|
||||
</record>
|
||||
<record model="workflow.activity" id="purchase_activity_confirmed">
|
||||
<field name="name">Confirmed</field>
|
||||
|
||||
Reference in new issue
Block a user