Browse Source

to work also when you change the stte of invoice and maybe you delete the picking

pull/134/head
devCbssolutionsRo 6 years ago
parent
commit
408b317aaa
  1. 2
      invoice_stock_move/models/invoice_stock.py

2
invoice_stock_move/models/invoice_stock.py

@ -30,7 +30,7 @@ _logger = logging.getLogger(__name__)
class InvoiceStockMove(models.Model):
_inherit = 'account.move'
@api.onchange('type','invoice_line_ids','id')
@api.onchange('type','invoice_line_ids','id','state')
def onchange_invoice_type(self):
if self.env.context.get('default_team_id',False) or (self._fields.get('team_id',False) and self.invoice_origin): # is a invoice from sale order

Loading…
Cancel
Save