This commit is contained in:
oscar alvarez 2023-05-08 08:59:52 -05:00
parent 7ec8d6fc62
commit a681d1c188

View file

@ -1600,7 +1600,18 @@ class FolioCharge(Workflow, ModelSQL, ModelView):
def default_kind():
return 'product'
@staticmethod
@staticmethod self.description = self.product.template.name
# FIXME
# if not self.folio.taxes_exception:
# self.taxes = [
# tax.id for tax in self.product.customer_taxes_used
# ]
self.taxes = [
tax.id for tax in self.product.customer_taxes_used
]
def get_move_line(self, account, party, amount):
debit = credit = _ZERO
def default_status():
return 'pending'
@ -1672,16 +1683,16 @@ class FolioCharge(Workflow, ModelSQL, ModelView):
cls.create_sales(records)
@fields.depends('unit_price', 'folio', 'product', 'description', 'taxes',
'_parent_folio.main_guest', 'folio.taxes_exception')
'_parent_folio.main_guest')
def on_change_product(self):
if self.product:
self.unit_price = round(self.product.template.list_price, 2)
self.description = self.product.template.name
# FIXME
# if not self.folio.taxes_exception:
# self.taxes = [
# tax.id for tax in self.product.customer_taxes_used
# ]
self.taxes = [
tax.id for tax in self.product.customer_taxes_used
]
def get_move_line(self, account, party, amount):
debit = credit = _ZERO