File tree Expand file tree Collapse file tree
account_background_post/wizards Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -41,21 +41,21 @@ def validate_move(self):
4141
4242 3. Limitamos sui el usuario quiere validar mas facturas que el batch size definido directamente
4343 le pedimos que las valide en background."""
44- if self .count_inv <= 1 : # or 0 or 1
45- return super ().validate_move ()
46-
47- if self .count_inv > self .batch_size :
48- raise UserError (
49- _ (
50- "You can only validate on batches of size < %s invoices. If you need to validate"
51- " more invoices please use the validate on background option" ,
52- self .batch_size ,
44+ if self .count_inv :
45+ if self .count_inv > self .batch_size :
46+ raise UserError (
47+ _ (
48+ "You can only validate on batches of size < %s invoices. If you need to validate"
49+ " more invoices please use the validate on background option" ,
50+ self .batch_size ,
51+ )
5352 )
54- )
5553
56- for move in self .move_ids :
57- _logger .info ("Validating invoice %s" , move .id )
58- move .action_post ()
59- move .env .cr .commit ()
54+ for move in self .move_ids :
55+ _logger .info ("Validating invoice %s" , move .id )
56+ move .action_post ()
57+ move .env .cr .commit ()
6058
61- return {"type" : "ir.actions.act_window_close" }
59+ return {"type" : "ir.actions.act_window_close" }
60+ else :
61+ return super ().validate_move ()
You can’t perform that action at this time.
0 commit comments