02.04.26
This commit is contained in:
@@ -770,14 +770,22 @@ class SaleLine(metaclass=PoolMeta):
|
||||
pricing_rule = self.pricing_rule
|
||||
return pricing_rule
|
||||
|
||||
@property
|
||||
def get_pricing_text(self):
|
||||
pricing_text = ''
|
||||
if self.price_components:
|
||||
for pc in self.price_components:
|
||||
if pc.price_index:
|
||||
pricing_text += 'ON ' + pc.price_index.price_desc + ' ' + (pc.price_index.price_period.description if pc.price_index.price_period else '')
|
||||
return pricing_text
|
||||
@property
|
||||
def get_pricing_text(self):
|
||||
parts = []
|
||||
if self.price_components:
|
||||
for pc in self.price_components:
|
||||
if pc.price_index:
|
||||
price_desc = pc.price_index.price_desc or ''
|
||||
period_desc = (
|
||||
pc.price_index.price_period.description
|
||||
if pc.price_index.price_period else '') or ''
|
||||
part = ' '.join(
|
||||
piece for piece in ['ON', price_desc, period_desc]
|
||||
if piece)
|
||||
if part:
|
||||
parts.append(part)
|
||||
return ' '.join(parts)
|
||||
|
||||
@fields.depends('product')
|
||||
def on_change_with_attribute_set(self, name=None):
|
||||
|
||||
Reference in New Issue
Block a user