[9.0][REW] rma: workflow centralized on rma.order.line and the use of rma.order is optional.

This commit is contained in:
lreficent
2017-10-18 12:20:27 +02:00
committed by ahenriquez
parent f6c7550603
commit a82f603497
8 changed files with 395 additions and 252 deletions

View File

@@ -8,7 +8,10 @@ from openerp import api, fields, models
class ProcurementOrder(models.Model):
_inherit = 'procurement.order'
rma_line_id = fields.Many2one('rma.order.line', 'RMA', ondelete="set null")
rma_line_id = fields.Many2one(
comodel_name='rma.order.line', string='RMA line',
ondelete="set null",
)
@api.model
def _run_move_create(self, procurement):
@@ -26,4 +29,11 @@ class ProcurementOrder(models.Model):
class ProcurementGroup(models.Model):
_inherit = 'procurement.group'
rma_id = fields.Many2one('rma.order', 'RMA', ondelete="set null")
rma_id = fields.Many2one(
comodel_name='rma.order', string='RMA',
ondelete="set null",
)
rma_line_id = fields.Many2one(
comodel_name='rma.order.line', string='RMA line',
ondelete="set null",
)