minor fix

This commit is contained in:
wilsongomez 2022-08-10 15:50:46 -05:00
parent 0b32d6f23d
commit fe469f5d98
2 changed files with 7 additions and 5 deletions

View File

@ -41,9 +41,11 @@ class PriceListLine(metaclass=PoolMeta):
] ]
def get_price_computed(self, name): def get_price_computed(self, name):
context = self.price_list.get_context_formula( value = 0
None, self.product, self.product.list_price, 0, None) if self.product:
value = self.get_unit_price(**context) context = self.price_list.get_context_formula(
None, self.product, self.product.list_price, 0, None)
value = self.get_unit_price(**context)
return value return value
def get_price_w_tax_computed(self, name=None): def get_price_w_tax_computed(self, name=None):

View File

@ -4,9 +4,9 @@ this repository contains the full copyright notices and license terms. -->
<data> <data>
<xpath expr="/tree/field[@name='formula']" position="after"> <xpath expr="/tree/field[@name='formula']" position="after">
<field name="price_computed"/> <!-- <field name="price_computed"/>
<field name="price_w_tax_computed"/> <field name="price_w_tax_computed"/>
<field name="profit"/> <field name="profit"/> -->
</xpath> </xpath>
</data> </data>