77# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
88
99from odoo import _ , api , fields , models
10- from odoo .exceptions import Warning as UserError
10+ from odoo .exceptions import UserError
1111
1212
1313class AccountPaymentTerm (models .Model ):
@@ -89,8 +89,8 @@ def _compute_is_past_due(self):
8989 )
9090
9191 @api .model_create_multi
92- def create (self , vals ):
93- invoices = super ().create (vals )
92+ def create (self , vals_list ):
93+ invoices = super ().create (vals_list )
9494 for invoice in invoices :
9595 if not invoice .riba_partner_bank_id :
9696 invoice ._onchange_riba_partner_bank_id ()
@@ -201,7 +201,7 @@ def action_post(self):
201201 def button_draft (self ):
202202 # ---- Delete Collection Fees Line of invoice when set Back to Draft
203203 # ---- line was added on new validate
204- res = super (AccountMove , self ).button_draft ()
204+ res = super ().button_draft ()
205205 for invoice in self :
206206 due_cost_line_ids = invoice .get_due_cost_line_ids ()
207207 if due_cost_line_ids :
@@ -230,16 +230,19 @@ def button_cancel(self):
230230 if len (riba_line_ids ) > 1 :
231231 riba_line_ids = riba_line_ids [0 ]
232232 raise UserError (
233- _ ("Invoice is linked to RiBa slip No. {riba}" ).format (
234- riba = riba_line_ids .riba_line_id .slip_id .name
233+ _ (
234+ "Invoice is linked to RiBa slip No. %(riba)s" ,
235+ riba = riba_line_ids .riba_line_id .slip_id .name ,
235236 )
236237 )
237- return super (AccountMove , self ).button_cancel ()
238+ return super ().button_cancel ()
238239
239240 def copy (self , default = None ):
240241 self .ensure_one ()
241242 # Delete Collection Fees Line of invoice when copying
242- invoice = super (AccountMove , self ).copy (default )
243+ invoice = super ().copy (
244+ default = default ,
245+ )
243246 if invoice :
244247 due_cost_line_ids = invoice .get_due_cost_line_ids ()
245248 if due_cost_line_ids :
@@ -295,13 +298,19 @@ def fields_view_get(
295298 if ids and view_id == view_payments_tree_id [1 ]:
296299 # Use RiBa slip
297300 result = super (models .Model , self ).fields_view_get (
298- view_id , view_type , toolbar = toolbar , submenu = submenu
301+ view_id = view_id ,
302+ view_type = view_type ,
303+ toolbar = toolbar ,
304+ submenu = submenu ,
299305 )
300306 else :
301307 # Use special views for account.move.line object
302308 # (for ex. tree view contains user defined fields)
303- result = super (AccountMoveLine , self ).fields_view_get (
304- view_id , view_type , toolbar = toolbar , submenu = submenu
309+ result = super ().fields_view_get (
310+ view_id = view_id ,
311+ view_type = view_type ,
312+ toolbar = toolbar ,
313+ submenu = submenu ,
305314 )
306315 return result
307316
@@ -322,7 +331,7 @@ def update_paid_riba_lines(self):
322331 riba_line .slip_id .state = "paid"
323332
324333 def reconcile (self ):
325- res = super (AccountMoveLine , self ).reconcile ()
334+ res = super ().reconcile ()
326335 for line in self :
327336 line .update_paid_riba_lines ()
328337 return res
@@ -371,7 +380,7 @@ def unlink(self):
371380 riba_lines = None
372381 for rec in self :
373382 riba_lines = rec .get_riba_lines ()
374- res = super (AccountFullReconcile , self ).unlink ()
383+ res = super ().unlink ()
375384 if riba_lines :
376385 self .unreconcile_riba_lines (riba_lines )
377386 return res
@@ -384,7 +393,7 @@ def unlink(self):
384393 riba_lines = None
385394 for rec in self :
386395 riba_lines = rec .get_riba_lines ()
387- res = super (AccountPartialReconcile , self ).unlink ()
396+ res = super ().unlink ()
388397 if riba_lines :
389398 self .env ["account.full.reconcile" ].unreconcile_riba_lines (riba_lines )
390399 return res
0 commit comments