@@ -1745,12 +1745,9 @@ def test_cron_recurring_create_invoice(self):
1745
1745
)
1746
1746
1747
1747
def test_cron_recurring_create_invoice_several_partners (self ):
1748
- self .acct_line .date_start = "2018-01-01"
1749
- self .acct_line .recurring_invoicing_type = "post-paid"
1750
- self .acct_line .date_end = "2018-03-15"
1751
- other_partner = self .env .ref ('base.res_partner_1' )
1752
- contracts = self .contract2
1753
- contracts |= self .contract .copy ({'partner_id' : other_partner .id })
1748
+ other_partner = self .env .ref ("base.res_partner_1" )
1749
+ contracts = self .contract
1750
+ contracts |= self .contract .copy ({"invoice_partner_id" : other_partner .id })
1754
1751
self .env ["contract.contract" ].cron_recurring_create_invoice ()
1755
1752
invoice_lines = self .env ["account.move.line" ].search (
1756
1753
[("contract_line_id" , "in" , contracts .mapped ("contract_line_ids" ).ids )]
@@ -1759,10 +1756,9 @@ def test_cron_recurring_create_invoice_several_partners(self):
1759
1756
len (contracts .mapped ("contract_line_ids" )),
1760
1757
len (invoice_lines ),
1761
1758
)
1762
- self .assertEqual (len (invoice_lines .mapped ('move_id' )), 2 )
1763
- self .assertEqual (len (invoice_lines .mapped ('move_id.partner_id' )), 2 )
1764
- self .assertIn (
1765
- other_partner , invoice_lines .mapped ('move_id.partner_id' ))
1759
+ self .assertEqual (len (invoice_lines .mapped ("move_id" )), 2 )
1760
+ self .assertEqual (len (invoice_lines .mapped ("move_id.partner_id" )), 2 )
1761
+ self .assertIn (other_partner , invoice_lines .mapped ("move_id.partner_id" ))
1766
1762
1767
1763
def test_recurring_create_invoice (self ):
1768
1764
self .acct_line .date_start = "2024-01-01"
0 commit comments