@@ -169,8 +169,9 @@ class Invoice(Workflow, ModelSQL, ModelView, TaxableMixin):
|
||||
Eval('accounting_date'),
|
||||
Eval('invoice_date')),
|
||||
})
|
||||
payment_term = fields.Many2One('account.invoice.payment_term',
|
||||
'Payment Term', states=_states)
|
||||
payment_term = fields.Many2One(
|
||||
'account.invoice.payment_term', "Payment Term",
|
||||
ondelete='RESTRICT', states=_states)
|
||||
alternative_payees = fields.Many2Many(
|
||||
'account.invoice.alternative_payee', 'invoice', 'party',
|
||||
"Alternative Payee", states=_states,
|
||||
|
||||
@@ -92,8 +92,9 @@ class Purchase(
|
||||
'required': ~Eval('state').in_(
|
||||
['draft', 'quotation', 'cancelled']),
|
||||
})
|
||||
payment_term = fields.Many2One('account.invoice.payment_term',
|
||||
'Payment Term', states={
|
||||
payment_term = fields.Many2One(
|
||||
'account.invoice.payment_term', "Payment Term", ondelete='RESTRICT',
|
||||
states={
|
||||
'readonly': ~Eval('state').in_(['draft', 'quotation']),
|
||||
})
|
||||
party = fields.Many2One('party.party', 'Party', required=True,
|
||||
|
||||
@@ -196,7 +196,7 @@ class AmendmentLine(ModelSQL, ModelView):
|
||||
})
|
||||
|
||||
payment_term = fields.Many2One(
|
||||
'account.invoice.payment_term', "Payment Term",
|
||||
'account.invoice.payment_term', "Payment Term", ondelete='RESTRICT',
|
||||
states={
|
||||
'invisible': Eval('action') != 'payment_term',
|
||||
})
|
||||
|
||||
@@ -89,8 +89,8 @@ class Sale(
|
||||
'required': ~Eval('state').in_(
|
||||
['draft', 'quotation', 'cancelled']),
|
||||
})
|
||||
payment_term = fields.Many2One('account.invoice.payment_term',
|
||||
'Payment Term',
|
||||
payment_term = fields.Many2One(
|
||||
'account.invoice.payment_term', "Payment Term", ondelete='RESTRICT',
|
||||
states={
|
||||
'readonly': Eval('state') != 'draft',
|
||||
})
|
||||
|
||||
@@ -212,7 +212,7 @@ class AmendmentLine(ModelSQL, ModelView):
|
||||
})
|
||||
|
||||
payment_term = fields.Many2One(
|
||||
'account.invoice.payment_term', "Payment Term",
|
||||
'account.invoice.payment_term', "Payment Term", ondelete='RESTRICT',
|
||||
states={
|
||||
'invisible': Eval('action') != 'payment_term',
|
||||
})
|
||||
|
||||
@@ -75,8 +75,9 @@ class SaleOpportunity(
|
||||
"Amount", currency='currency', digits='currency',
|
||||
states=_states_stop,
|
||||
help='Estimated revenue amount.')
|
||||
payment_term = fields.Many2One('account.invoice.payment_term',
|
||||
'Payment Term', states={
|
||||
payment_term = fields.Many2One(
|
||||
'account.invoice.payment_term', "Payment Term", ondelete='RESTRICT',
|
||||
states={
|
||||
'readonly': In(Eval('state'),
|
||||
['converted', 'lost', 'cancelled']),
|
||||
})
|
||||
|
||||
@@ -92,7 +92,7 @@ class Subscription(Workflow, ModelSQL, ModelView):
|
||||
'required': ~Eval('state').in_(['draft']),
|
||||
})
|
||||
payment_term = fields.Many2One(
|
||||
'account.invoice.payment_term', "Payment Term",
|
||||
'account.invoice.payment_term', "Payment Term", ondelete='RESTRICT',
|
||||
states={
|
||||
'readonly': Eval('state') != 'draft',
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user