Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package trytond_account_invoice for 
openSUSE:Factory checked in at 2023-05-23 14:55:25
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/trytond_account_invoice (Old)
 and      /work/SRC/openSUSE:Factory/.trytond_account_invoice.new.1533 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "trytond_account_invoice"

Tue May 23 14:55:25 2023 rev:28 rq:1088642 version:6.0.12

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/trytond_account_invoice/trytond_account_invoice.changes
  2023-04-07 23:29:21.454459638 +0200
+++ 
/work/SRC/openSUSE:Factory/.trytond_account_invoice.new.1533/trytond_account_invoice.changes
        2023-05-23 14:55:46.998923297 +0200
@@ -1,0 +2,5 @@
+Sat May 20 17:02:17 UTC 2023 - Axel Braun <axel.br...@gmx.de>
+
+- Version 6.0.12 - Bugfix Release
+
+-------------------------------------------------------------------

Old:
----
  trytond_account_invoice-6.0.10.tar.gz
  trytond_account_invoice-6.0.10.tar.gz.asc

New:
----
  trytond_account_invoice-6.0.12.tar.gz
  trytond_account_invoice-6.0.12.tar.gz.asc

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ trytond_account_invoice.spec ++++++
--- /var/tmp/diff_new_pack.vVQWPl/_old  2023-05-23 14:55:47.526926421 +0200
+++ /var/tmp/diff_new_pack.vVQWPl/_new  2023-05-23 14:55:47.530926445 +0200
@@ -19,7 +19,7 @@
 
 %define majorver 6.0
 Name:           trytond_account_invoice
-Version:        %{majorver}.10
+Version:        %{majorver}.12
 Release:        0
 Summary:        The "account_invoice" module for the Tryton ERP system
 License:        GPL-3.0-only

++++++ trytond_account_invoice-6.0.10.tar.gz -> 
trytond_account_invoice-6.0.12.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/trytond_account_invoice-6.0.10/CHANGELOG 
new/trytond_account_invoice-6.0.12/CHANGELOG
--- old/trytond_account_invoice-6.0.10/CHANGELOG        2023-04-02 
00:28:17.000000000 +0200
+++ new/trytond_account_invoice-6.0.12/CHANGELOG        2023-05-17 
22:59:37.000000000 +0200
@@ -1,4 +1,14 @@
 
+Version 6.0.12 - 2023-05-17
+---------------------------
+* Bug fixes (see mercurial logs for details)
+
+
+Version 6.0.11 - 2023-05-03
+---------------------------
+* Bug fixes (see mercurial logs for details)
+
+
 Version 6.0.10 - 2023-04-01
 ---------------------------
 * Bug fixes (see mercurial logs for details)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/trytond_account_invoice-6.0.10/PKG-INFO 
new/trytond_account_invoice-6.0.12/PKG-INFO
--- old/trytond_account_invoice-6.0.10/PKG-INFO 2023-04-02 00:28:22.242639300 
+0200
+++ new/trytond_account_invoice-6.0.12/PKG-INFO 2023-05-17 22:59:40.242490500 
+0200
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: trytond_account_invoice
-Version: 6.0.10
+Version: 6.0.12
 Summary: Tryton module for invoicing
 Home-page: http://www.tryton.org/
 Download-URL: http://downloads.tryton.org/6.0/
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/trytond_account_invoice-6.0.10/invoice.py 
new/trytond_account_invoice-6.0.12/invoice.py
--- old/trytond_account_invoice-6.0.10/invoice.py       2023-02-27 
18:51:39.000000000 +0100
+++ new/trytond_account_invoice-6.0.12/invoice.py       2023-05-14 
00:14:03.000000000 +0200
@@ -436,18 +436,6 @@
         if self.company:
             return self.company.party.id
 
-    @fields.depends('party', 'type', 'accounting_date', 'invoice_date')
-    def on_change_with_account(self):
-        account = None
-        if self.party:
-            with Transaction().set_context(
-                    date=self.accounting_date or self.invoice_date):
-                if self.type == 'out':
-                    account = self.party.account_receivable_used
-                elif self.type == 'in':
-                    account = self.party.account_payable_used
-        return account.id if account else None
-
     @fields.depends('type')
     def on_change_type(self):
         Journal = Pool().get('account.journal')
@@ -473,16 +461,36 @@
         table, _ = tables[None]
         return [Coalesce(table.accounting_date, table.invoice_date)]
 
-    @fields.depends('party', 'type')
+    @fields.depends('party', 'type', methods=['_update_account'])
     def on_change_party(self):
         self.invoice_address = None
         if self.party:
             self.invoice_address = self.party.address_get(type='invoice')
             self.party_tax_identifier = self.party.tax_identifier
             if self.type == 'out':
+                self.account = self.party.account_receivable_used
                 self.payment_term = self.party.customer_payment_term
             elif self.type == 'in':
+                self.account = self.party.account_payable_used
                 self.payment_term = self.party.supplier_payment_term
+        self._update_account()
+
+    @fields.depends(methods=['_update_account'])
+    def on_change_accounting_date(self):
+        self._update_account()
+
+    @fields.depends(methods=['_update_account'])
+    def on_change_invoice_date(self):
+        self._update_account()
+
+    @fields.depends('account', 'accounting_date', 'invoice_date')
+    def _update_account(self):
+        "Update account to current account"
+        if self.account:
+            account = self.account.current(
+                date=self.accounting_date or self.invoice_date)
+            if account != self.account:
+                self.account = account
 
     @fields.depends('currency')
     def on_change_with_currency_digits(self, name=None):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/trytond_account_invoice-6.0.10/tryton.cfg 
new/trytond_account_invoice-6.0.12/tryton.cfg
--- old/trytond_account_invoice-6.0.10/tryton.cfg       2023-03-04 
13:18:21.000000000 +0100
+++ new/trytond_account_invoice-6.0.12/tryton.cfg       2023-05-03 
19:01:39.000000000 +0200
@@ -1,5 +1,5 @@
 [tryton]
-version=6.0.10
+version=6.0.12
 depends:
     account
     account_product
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/trytond_account_invoice-6.0.10/trytond_account_invoice.egg-info/PKG-INFO 
new/trytond_account_invoice-6.0.12/trytond_account_invoice.egg-info/PKG-INFO
--- 
old/trytond_account_invoice-6.0.10/trytond_account_invoice.egg-info/PKG-INFO    
    2023-04-02 00:28:21.000000000 +0200
+++ 
new/trytond_account_invoice-6.0.12/trytond_account_invoice.egg-info/PKG-INFO    
    2023-05-17 22:59:39.000000000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: trytond-account-invoice
-Version: 6.0.10
+Version: 6.0.12
 Summary: Tryton module for invoicing
 Home-page: http://www.tryton.org/
 Download-URL: http://downloads.tryton.org/6.0/

Reply via email to