changeset 0dfc061280bf in modules/account:default
details: https://hg.tryton.org/modules/account?cmd=changeset&node=0dfc061280bf
description:
Add company property to test tax
A company is needed by TaxableMixin since rev 2a191ce7df99
issue11624
review419641003
diffstat:
tax.py | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diffs (18 lines):
diff -r a1b7778a417c -r 0dfc061280bf tax.py
--- a/tax.py Sat Aug 06 23:00:50 2022 +0200
+++ b/tax.py Mon Aug 08 22:19:22 2022 +0200
@@ -1886,6 +1886,14 @@
return company.currency.id
@property
+ def company(self):
+ pool = Pool()
+ Company = pool.get('company.company')
+ company_id = Transaction().context.get('company')
+ if company_id:
+ return Company(company_id)
+
+ @property
def taxable_lines(self):
return [(self.taxes, self.unit_price, self.quantity, self.tax_date)]