[ADD] rma_operating_unit

This commit is contained in:
aheficent
2017-08-03 18:13:44 +02:00
committed by Aaron ForgeFlow
parent 186fe929a0
commit 3eeaa50707
9 changed files with 248 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
# -*- coding: utf-8 -*-
# © 2017 Eficent Business and IT Consulting Services S.L.
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html).
from openerp import api, fields, models, _
from openerp.exceptions import ValidationError
class RmaOrder(models.Model):
_inherit = "rma.order"
@api.model
def _default_operating_unit(self):
return self.env.user.default_operating_unit_id
operating_unit_id = fields.Many2one(
comodel_name='operating.unit',
string='Operating Unit',
default=_default_operating_unit,
)