Allow sale without payment term

issue4286
review16251002
This commit is contained in:
Sergi Almacellas Abellana committed 2016-05-17 09:50:53 +02:00
1 parent 86f6213bb4
commit 0ea036d213
2 files changed
+7 -1

No files matched your search

+2
View File
@@ -1,3 +1,5 @@
* Allow sale without payment term
Version 4.0.0 - 2016-05-02
* Bug fixes (see mercurial logs for details)
* Rename Sale reference into number and add reference
+5 -1
View File
@@ -66,7 +66,8 @@ class Sale(Workflow, ModelSQL, ModelView, TaxableMixin):
},
depends=['state'])
payment_term = fields.Many2One('account.invoice.payment_term',
'Payment Term', required=True, states={
'Payment Term',
states={
'readonly': Eval('state') != 'draft',
},
depends=['state'])
@@ -341,6 +342,9 @@ class Sale(Workflow, ModelSQL, ModelView, TaxableMixin):
table = TableHandler(cls, module_name)
table.index_action('create_date', action='add')
# Migration from 4.0: Drop not null on payment_term
table.not_null_action('payment_term', 'remove')
@classmethod
def default_payment_term(cls):
PaymentTerm = Pool().get('account.invoice.payment_term')