changeset 5390646301cb in modules/account:default
details: https://hg.tryton.org/modules/account?cmd=changeset;node=5390646301cb
description:
        Add default company value for account type

        issue8471
        review265641002
diffstat:

 account.py |  4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diffs (14 lines):

diff -r 2692314990b4 -r 5390646301cb account.py
--- a/account.py        Tue Jul 09 23:23:31 2019 +0200
+++ b/account.py        Tue Jul 09 23:24:51 2019 +0200
@@ -274,6 +274,10 @@
     def default_template_override(cls):
         return False
 
+    @classmethod
+    def default_company(cls):
+        return Transaction().context.get('company')
+
     def get_currency_digits(self, name):
         return self.company.currency.digits
 

Reply via email to