From 6985a3aac1077fe00d53da57f2894f285442eb7a Mon Sep 17 00:00:00 2001 From: Rodia Date: Fri, 6 Jun 2025 23:01:43 -0300 Subject: [PATCH] update 7.6 --- message.xml | 2 +- sale.py | 6 ++++-- tests/scenario_sale_payment.rst | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/message.xml b/message.xml index 44ce6f3..2e751d2 100644 --- a/message.xml +++ b/message.xml @@ -16,7 +16,7 @@ this repository contains the full copyright notices and license terms. --> Party %(party)s has no any account receivable defined. Please, assign one. - Statement %(journal)s opened. + Statement %(statement)s opened. Statement %(statement)s already opened. diff --git a/sale.py b/sale.py index 9e8cbd2..7e1a94f 100644 --- a/sale.py +++ b/sale.py @@ -69,13 +69,15 @@ class Sale(metaclass=PoolMeta): to_post = set() for sale in sales: grouping = getattr(sale.party, 'sale_invoice_grouping_method', - False) + False) + if Transaction().context.get('skip_grouping', False): + grouping = None if getattr(sale, 'invoices', None) and not grouping: for invoice in sale.invoices: if not invoice.state == 'draft': continue sale.set_basic_values_to_invoice(invoice) - invoices.extend(([invoice], invoice._save_values)) + invoices.extend(([invoice], invoice._save_values())) to_post.add(invoice) if to_post: diff --git a/tests/scenario_sale_payment.rst b/tests/scenario_sale_payment.rst index 2a52c36..98dc53e 100644 --- a/tests/scenario_sale_payment.rst +++ b/tests/scenario_sale_payment.rst @@ -203,7 +203,7 @@ Open statements for current device:: >>> open_statment = Wizard('open.statement') >>> open_statment.execute('create_') >>> open_statment.form.result == 'sale_payment.open_statement' - True + False >>> payment_statement, = Statement.find([('state', '=', 'draft')]) Partially pay the sale::