diff options
| author | stephanchrst <stephanchrst@gmail.com> | 2023-06-02 15:41:53 +0700 |
|---|---|---|
| committer | stephanchrst <stephanchrst@gmail.com> | 2023-06-02 15:41:53 +0700 |
| commit | ed2cd466938f7aee19688b6402edbb3643ee21e1 (patch) | |
| tree | b4815c1aeada4422472d423e00d79722b2b08c1a | |
| parent | aff9fdd49543648bfed395fff0c86af5b0269686 (diff) | |
add missing table validation before run validate
| -rw-r--r-- | indoteknik_custom/models/stock_picking.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/indoteknik_custom/models/stock_picking.py b/indoteknik_custom/models/stock_picking.py index 8c366082..54b478ae 100644 --- a/indoteknik_custom/models/stock_picking.py +++ b/indoteknik_custom/models/stock_picking.py @@ -248,6 +248,9 @@ class StockPicking(models.Model): return def button_validate(self): + if self._name != 'stock.picking': + return super(StockPicking, self).button_validate() + if not self.picking_code: self.picking_code = self.env['ir.sequence'].next_by_code('stock.picking.code') or '0' |
