Make 'unit_price' the default margin method.
This commit is contained in:
parent
23f70a93f2
commit
63452dfdbf
|
@ -38,7 +38,7 @@ class ConfigurationSaleMethod(metaclass=PoolMeta):
|
|||
|
||||
@classmethod
|
||||
def default_sale_margin_method(cls):
|
||||
return 'cost_price'
|
||||
return 'unit_price'
|
||||
|
||||
@classmethod
|
||||
def write(cls, *args):
|
||||
|
@ -47,7 +47,7 @@ class ConfigurationSaleMethod(metaclass=PoolMeta):
|
|||
if not 'sale_margin_method' in values:
|
||||
continue
|
||||
for record in records:
|
||||
current = record.sale_margin_method or 'cost_price'
|
||||
current = record.sale_margin_method or 'unit_price'
|
||||
if current != values['sale_margin_method']:
|
||||
cls.check_no_sale()
|
||||
super().write(*args)
|
||||
|
|
Loading…
Reference in New Issue