mirror of
https://github.com/ForgeFlow/stock-rma.git
synced 2025-01-21 12:57:49 +02:00
[11.0] MIG: RMA module
This commit is contained in:
committed by
Mateu Griful
parent
37821a55c8
commit
c8c497aadc
9
rma/models/stock.py
Normal file → Executable file
9
rma/models/stock.py
Normal file → Executable file
@@ -30,9 +30,8 @@ class StockMove(models.Model):
|
||||
|
||||
@api.model
|
||||
def create(self, vals):
|
||||
if vals.get('procurement_id'):
|
||||
procurement = self.env['procurement.order'].browse(
|
||||
vals['procurement_id'])
|
||||
if procurement.rma_line_id:
|
||||
vals['rma_line_id'] = procurement.rma_line_id.id
|
||||
if vals.get('group_id'):
|
||||
group = self.env['procurement.group'].browse(vals['group_id'])
|
||||
if group.rma_line_id:
|
||||
vals['rma_line_id'] = group.rma_line_id.id
|
||||
return super(StockMove, self).create(vals)
|
||||
|
||||
Reference in New Issue
Block a user