09.03.26
This commit is contained in:
@@ -278,6 +278,22 @@ class Sale(metaclass=PoolMeta):
|
||||
else:
|
||||
return ''
|
||||
|
||||
@property
|
||||
def get_pricing_text(self):
|
||||
pricing_text = ''
|
||||
if self.price_components:
|
||||
for pc in self.price_components:
|
||||
if pc.price_index:
|
||||
pricing_text += ' ' + pc.price_index.description
|
||||
return pricing_text
|
||||
|
||||
@property
|
||||
def report_fixing_rule(self):
|
||||
pricing_rule = ''
|
||||
if self.lines:
|
||||
pricing_rule = self.lines[0].pricing_rule
|
||||
return pricing_rule
|
||||
|
||||
@property
|
||||
def report_price(self):
|
||||
if self.lines:
|
||||
@@ -539,6 +555,8 @@ class SaleLine(metaclass=PoolMeta):
|
||||
fields.Char("Attributes Name"),
|
||||
'on_change_with_attributes_name'
|
||||
)
|
||||
|
||||
pricing_rule = fields.Text("Pricing description")
|
||||
|
||||
@fields.depends('product')
|
||||
def on_change_with_attribute_set(self, name=None):
|
||||
@@ -585,14 +603,6 @@ class SaleLine(metaclass=PoolMeta):
|
||||
LotQt = Pool().get('lot.qt')
|
||||
return LotQt.search([('lot_s','=',self.lots[0].id),('lot_p','>',0)])
|
||||
|
||||
def get_pricing_text(self):
|
||||
pricing_text = ''
|
||||
if self.price_components:
|
||||
for pc in self.price_components:
|
||||
if pc.price_index:
|
||||
pricing_text += ' ' + pc.price_index.description
|
||||
return pricing_text
|
||||
|
||||
def get_date(self,trigger_event):
|
||||
trigger_date = None
|
||||
if self.estimated_date:
|
||||
|
||||
Reference in New Issue
Block a user