diff options
| author | Simon Lejeune <sle@openerp.com> | 2020-01-17 12:19:15 +0000 |
|---|---|---|
| committer | Rémy Voet (ryv) <ryv@odoo.com> | 2020-01-20 14:01:21 +0000 |
| commit | b9334c53b84228c00ab100ffd28620b3c923c4e6 (patch) | |
| tree | 68dc96e5b5b854d18606fc9d5e746aa1b8aa731a /addons/product_expiry | |
| parent | 177a479cf66ecab017fadf2034fc52501643ee41 (diff) | |
[REF] stock: move line: some guidelines
- move all the constrains at the same place, make sure they are private
- move all the onchanges at the same place, make sure they are private
- move `_get_similar_move_lines` helper at the bottom of the file with
the other helpers
Diffstat (limited to 'addons/product_expiry')
| -rw-r--r-- | addons/product_expiry/models/stock_move_line.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/product_expiry/models/stock_move_line.py b/addons/product_expiry/models/stock_move_line.py index db8956563d2..49e9a6fc180 100644 --- a/addons/product_expiry/models/stock_move_line.py +++ b/addons/product_expiry/models/stock_move_line.py @@ -14,8 +14,8 @@ class StockMoveLine(models.Model): ' become dangerous and must not be consumed.') @api.onchange('product_id', 'product_uom_id') - def onchange_product_id(self): - res = super(StockMoveLine, self).onchange_product_id() + def _onchange_product_id(self): + res = super(StockMoveLine, self)._onchange_product_id() if self.picking_type_use_create_lots: if self.product_id.use_expiration_date: self.expiration_date = fields.Datetime.today() + datetime.timedelta(days=self.product_id.expiration_time) |
