From to + pricing component
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
# this repository contains the full copyright notices and license terms.
|
||||
from trytond.model import fields
|
||||
from trytond.pool import Pool, PoolMeta
|
||||
from trytond.pyson import Bool, Eval, Id
|
||||
from trytond.pyson import Bool, Eval, Id, If
|
||||
from trytond.model import (ModelSQL, ModelView)
|
||||
from trytond.exceptions import UserError
|
||||
from trytond.tools import is_full_text, lstrip_wildcard
|
||||
@@ -333,11 +333,11 @@ class Pricing(ModelSQL,ModelView):
|
||||
pricing_date = fields.Date("Date")
|
||||
price_component = fields.Many2One(
|
||||
'pricing.component', "Component",
|
||||
domain=[
|
||||
'OR',
|
||||
('line', '=', Eval('line', -1)),
|
||||
('sale_line', '=', Eval('sale_line', -1)),
|
||||
],
|
||||
domain=[If(Bool(Eval('line')),
|
||||
('line', '=', Eval('line')),
|
||||
If(Bool(Eval('sale_line')),
|
||||
('sale_line', '=', Eval('sale_line')),
|
||||
('id', '=', -1)))],
|
||||
depends=['line', 'sale_line'])#, ondelete='CASCADE')
|
||||
quantity = fields.Numeric("Qt",digits='unit')
|
||||
settl_price = fields.Numeric("Settl. price",digits='unit')
|
||||
|
||||
Reference in New Issue
Block a user