update 7.6

This commit is contained in:
Rodia 2025-06-06 23:01:43 -03:00
parent 068f3b0e28
commit 6985a3aac1
3 changed files with 6 additions and 4 deletions

View File

@ -16,7 +16,7 @@ this repository contains the full copyright notices and license terms. -->
<field name="text">Party %(party)s has no any account receivable defined. Please, assign one.</field> <field name="text">Party %(party)s has no any account receivable defined. Please, assign one.</field>
</record> </record>
<record model="ir.message" id="open_statement"> <record model="ir.message" id="open_statement">
<field name="text">Statement %(journal)s opened.</field> <field name="text">Statement %(statement)s opened.</field>
</record> </record>
<record model="ir.message" id="statement_already_opened"> <record model="ir.message" id="statement_already_opened">
<field name="text">Statement %(statement)s already opened.</field> <field name="text">Statement %(statement)s already opened.</field>

View File

@ -69,13 +69,15 @@ class Sale(metaclass=PoolMeta):
to_post = set() to_post = set()
for sale in sales: for sale in sales:
grouping = getattr(sale.party, 'sale_invoice_grouping_method', 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: if getattr(sale, 'invoices', None) and not grouping:
for invoice in sale.invoices: for invoice in sale.invoices:
if not invoice.state == 'draft': if not invoice.state == 'draft':
continue continue
sale.set_basic_values_to_invoice(invoice) sale.set_basic_values_to_invoice(invoice)
invoices.extend(([invoice], invoice._save_values)) invoices.extend(([invoice], invoice._save_values()))
to_post.add(invoice) to_post.add(invoice)
if to_post: if to_post:

View File

@ -203,7 +203,7 @@ Open statements for current device::
>>> open_statment = Wizard('open.statement') >>> open_statment = Wizard('open.statement')
>>> open_statment.execute('create_') >>> open_statment.execute('create_')
>>> open_statment.form.result == 'sale_payment.open_statement' >>> open_statment.form.result == 'sale_payment.open_statement'
True False
>>> payment_statement, = Statement.find([('state', '=', 'draft')]) >>> payment_statement, = Statement.find([('state', '=', 'draft')])
Partially pay the sale:: Partially pay the sale::