mirror of
https://github.com/OCA/contract.git
synced 2025-02-13 17:57:24 +02:00
[FIX] contract_invoice_merge_by_partner: Minor fix
This commit is contained in:
@@ -18,7 +18,7 @@ To install this module you need *account_invoice_merge*, available in:
|
||||
Usage
|
||||
=====
|
||||
|
||||
#. Go to *Sales > Contracts* and create some contrats with same partner
|
||||
#. Go to *Sales > Contracts* and create some contracts with same partner
|
||||
#. Go to *Settings > Automation > Scheduled Actions*
|
||||
#. Select *Generate Recurring Invoices from Contracts*
|
||||
#. Set previous time that now in *Next Execution Date*
|
||||
@@ -28,12 +28,6 @@ Usage
|
||||
:alt: Try me on Runbot
|
||||
:target: https://runbot.odoo-community.org/runbot/95/8.0
|
||||
|
||||
Known issues / Roadmap
|
||||
======================
|
||||
|
||||
* If product supplier info min quantity is greater than procurement qty and we
|
||||
have sale orders with distinct analytic account which contains this product,
|
||||
each purchase order line takes seller min quantity.
|
||||
|
||||
Bug Tracker
|
||||
===========
|
||||
|
||||
@@ -19,8 +19,7 @@ class PurchaseOrderLine(models.Model):
|
||||
for partner in invoices.mapped('partner_id'):
|
||||
inv_to_merge = invoices.filtered(lambda x: x.partner_id == partner)
|
||||
if len(inv_to_merge) > 1:
|
||||
invoices_info = inv_to_merge.do_merge(
|
||||
keep_references=True, date_invoice=False)
|
||||
invoices_info = inv_to_merge.do_merge()
|
||||
res.extend(invoices_info.keys())
|
||||
for inv_ids_list in invoices_info.values():
|
||||
unlink_list.extend(inv_ids_list)
|
||||
|
||||
@@ -35,7 +35,7 @@ class TestContractInvoiceMergeByPartner(TransactionCase):
|
||||
self.contract4 = self.contract1.copy()
|
||||
|
||||
def test_invoices_merged(self):
|
||||
self.env['account.analytic.account']._cron_recurring_create_invoice()
|
||||
self.env['account.analytic.account']._recurring_create_invoice()
|
||||
invoices = self.env['account.invoice'].search(
|
||||
[('partner_id', '=', self.partner.id)])
|
||||
inv_draft = invoices.filtered(lambda x: x.state == 'draft')
|
||||
|
||||
Reference in New Issue
Block a user