mirror of
https://github.com/ForgeFlow/stock-rma.git
synced 2025-01-21 12:57:49 +02:00
[FIX] Class typo, ProcurementRule is StockRule in V12.0
This commit is contained in:
committed by
ahenriquez
parent
31a379a49a
commit
e0e8e2a624
@@ -4,7 +4,7 @@
|
|||||||
from odoo import fields, models
|
from odoo import fields, models
|
||||||
|
|
||||||
|
|
||||||
class ProcurementRule(models.Model):
|
class StockRule(models.Model):
|
||||||
_inherit = 'stock.rule'
|
_inherit = 'stock.rule'
|
||||||
|
|
||||||
rma_line_id = fields.Many2one(
|
rma_line_id = fields.Many2one(
|
||||||
@@ -14,13 +14,12 @@ class ProcurementRule(models.Model):
|
|||||||
|
|
||||||
def _get_stock_move_values(self, product_id, product_qty, product_uom,
|
def _get_stock_move_values(self, product_id, product_qty, product_uom,
|
||||||
location_id, name, origin, values, group_id):
|
location_id, name, origin, values, group_id):
|
||||||
res = super(ProcurementRule, self)._get_stock_move_values(product_id,
|
res = super(StockRule, self)._get_stock_move_values(product_id,
|
||||||
product_qty,
|
product_qty,
|
||||||
product_uom,
|
product_uom,
|
||||||
location_id,
|
location_id,
|
||||||
name, origin,
|
name, origin,
|
||||||
values,
|
values, group_id)
|
||||||
group_id)
|
|
||||||
if 'rma_line_id' in values:
|
if 'rma_line_id' in values:
|
||||||
line = self.env['rma.order.line'].browse(values.get('rma_line_id'))
|
line = self.env['rma.order.line'].browse(values.get('rma_line_id'))
|
||||||
res['rma_line_id'] = line.id
|
res['rma_line_id'] = line.id
|
||||||
|
|||||||
Reference in New Issue
Block a user