mirror of
https://bitbucket.org/presik/trytonpsk-sale_pos.git
synced 2023-12-14 07:13:02 +01:00
minor fix
This commit is contained in:
parent
ddf825e649
commit
b1de077534
19
product.py
19
product.py
|
@ -66,7 +66,6 @@ class Product(metaclass=PoolMeta):
|
|||
extra_tax = self.extra_tax or 0
|
||||
tax_amount = sum([t['amount'] for t in tax_list], Decimal('0.0')) + extra_tax
|
||||
res = res + tax_amount
|
||||
|
||||
return round_num(res)
|
||||
|
||||
def get_sale_price_taxed(self, name=None, value=None):
|
||||
|
@ -82,8 +81,9 @@ class Product(metaclass=PoolMeta):
|
|||
|
||||
class Template(metaclass=PoolMeta):
|
||||
__name__ = 'product.template'
|
||||
sale_price_w_tax = fields.Numeric('Sale Price With Tax', digits=(16, 2),
|
||||
depends=['list_price', 'customer_taxes'], required=True)
|
||||
#remove field this is on module sale_pos_frontend
|
||||
# sale_price_w_tax = fields.Numeric('Sale Price With Tax', digits=(16, 2),
|
||||
# depends=['list_price', 'customer_taxes'], required=True)
|
||||
|
||||
# @fields.depends('customer_taxes', 'sale_price_w_tax', 'customer_taxes_used')
|
||||
# def on_change_with_list_price(self):
|
||||
|
@ -91,12 +91,13 @@ class Template(metaclass=PoolMeta):
|
|||
# res = self.compute_reverse_list_price(self.sale_price_w_tax)
|
||||
# return res
|
||||
|
||||
def compute_reverse_list_price(self, price_w_tax):
|
||||
Tax = Pool().get('account.tax')
|
||||
res = Tax.reverse_compute(price_w_tax, self.customer_taxes_used)
|
||||
res = res.quantize(
|
||||
Decimal(1) / 10 ** self.__class__.list_price.digits[1])
|
||||
return res
|
||||
# def compute_reverse_list_price(self, price_w_tax):
|
||||
# Tax = Pool().get('account.tax')
|
||||
# res = Tax.reverse_compute(price_w_tax, self.customer_taxes_used)
|
||||
# res = res.quantize(
|
||||
# Decimal(1) / 10 ** self.__class__.list_price.digits[1])
|
||||
# print(res, 'res')
|
||||
# return res
|
||||
|
||||
@classmethod
|
||||
def default_code_readonly(cls):
|
||||
|
|
Loading…
Reference in a new issue