88# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
99
1010from odoo import _ , api , fields , models
11- from odoo .exceptions import Warning as UserError
11+ from odoo .exceptions import UserError
1212
1313
1414class AccountPaymentTerm (models .Model ):
@@ -90,8 +90,8 @@ def _compute_is_past_due(self):
9090 )
9191
9292 @api .model_create_multi
93- def create (self , vals ):
94- invoices = super ().create (vals )
93+ def create (self , vals_list ):
94+ invoices = super ().create (vals_list )
9595 for invoice in invoices :
9696 if not invoice .riba_partner_bank_id :
9797 invoice ._onchange_riba_partner_bank_id ()
@@ -202,7 +202,7 @@ def action_post(self):
202202 def button_draft (self ):
203203 # ---- Delete Collection Fees Line of invoice when set Back to Draft
204204 # ---- line was added on new validate
205- res = super (AccountMove , self ).button_draft ()
205+ res = super ().button_draft ()
206206 for invoice in self :
207207 due_cost_line_ids = invoice .get_due_cost_line_ids ()
208208 if due_cost_line_ids :
@@ -231,16 +231,19 @@ def button_cancel(self):
231231 if len (riba_line_ids ) > 1 :
232232 riba_line_ids = riba_line_ids [0 ]
233233 raise UserError (
234- _ ("Invoice is linked to RiBa slip No. {riba}" ).format (
235- riba = riba_line_ids .riba_line_id .slip_id .name
234+ _ (
235+ "Invoice is linked to RiBa slip No. %(riba)s" ,
236+ riba = riba_line_ids .riba_line_id .slip_id .name ,
236237 )
237238 )
238- return super (AccountMove , self ).button_cancel ()
239+ return super ().button_cancel ()
239240
240241 def copy (self , default = None ):
241242 self .ensure_one ()
242243 # Delete Collection Fees Line of invoice when copying
243- invoice = super (AccountMove , self ).copy (default )
244+ invoice = super ().copy (
245+ default = default ,
246+ )
244247 if invoice :
245248 due_cost_line_ids = invoice .get_due_cost_line_ids ()
246249 if due_cost_line_ids :
@@ -296,13 +299,19 @@ def fields_view_get(
296299 if ids and view_id == view_payments_tree_id [1 ]:
297300 # Use RiBa slip
298301 result = super (models .Model , self ).fields_view_get (
299- view_id , view_type , toolbar = toolbar , submenu = submenu
302+ view_id = view_id ,
303+ view_type = view_type ,
304+ toolbar = toolbar ,
305+ submenu = submenu ,
300306 )
301307 else :
302308 # Use special views for account.move.line object
303309 # (for ex. tree view contains user defined fields)
304- result = super (AccountMoveLine , self ).fields_view_get (
305- view_id , view_type , toolbar = toolbar , submenu = submenu
310+ result = super ().fields_view_get (
311+ view_id = view_id ,
312+ view_type = view_type ,
313+ toolbar = toolbar ,
314+ submenu = submenu ,
306315 )
307316 return result
308317
@@ -323,7 +332,7 @@ def update_paid_riba_lines(self):
323332 riba_line .slip_id .state = "paid"
324333
325334 def reconcile (self ):
326- res = super (AccountMoveLine , self ).reconcile ()
335+ res = super ().reconcile ()
327336 for line in self :
328337 line .update_paid_riba_lines ()
329338 return res
@@ -372,7 +381,7 @@ def unlink(self):
372381 riba_lines = None
373382 for rec in self :
374383 riba_lines = rec .get_riba_lines ()
375- res = super (AccountFullReconcile , self ).unlink ()
384+ res = super ().unlink ()
376385 if riba_lines :
377386 self .unreconcile_riba_lines (riba_lines )
378387 return res
@@ -385,7 +394,7 @@ def unlink(self):
385394 riba_lines = None
386395 for rec in self :
387396 riba_lines = rec .get_riba_lines ()
388- res = super (AccountPartialReconcile , self ).unlink ()
397+ res = super ().unlink ()
389398 if riba_lines :
390399 self .env ["account.full.reconcile" ].unreconcile_riba_lines (riba_lines )
391400 return res
0 commit comments