mirror of
https://github.com/OCA/manufacture.git
synced 2025-01-28 16:37:15 +02:00
[11.0][REW/IMP] mrp_multi_level:
* Extract concept of planned orders from mrp.move. * Fix error grouping demand when there is no supply for a the first day of grouping. * Adapt tests.
This commit is contained in:
@@ -1,15 +1,16 @@
|
||||
# © 2016 Ucamco - Wim Audenaert <wim.audenaert@ucamco.com>
|
||||
# © 2016 Eficent Business and IT Consulting Services S.L.
|
||||
# © 2016-19 Eficent Business and IT Consulting Services S.L.
|
||||
# - Jordi Ballester Alomar <jordi.ballester@eficent.com>
|
||||
# - Lois Rilo Antelo <lois.rilo@eficent.com>
|
||||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
|
||||
|
||||
from odoo import fields, models
|
||||
from odoo import api, fields, models
|
||||
|
||||
|
||||
class MrpArea(models.Model):
|
||||
_name = 'mrp.area'
|
||||
|
||||
name = fields.Char('Name')
|
||||
name = fields.Char(required=True)
|
||||
warehouse_id = fields.Many2one(
|
||||
comodel_name='stock.warehouse', string='Warehouse',
|
||||
required=True,
|
||||
@@ -24,3 +25,9 @@ class MrpArea(models.Model):
|
||||
string='Working Hours',
|
||||
related='warehouse_id.calendar_id',
|
||||
)
|
||||
|
||||
@api.multi
|
||||
def _get_locations(self):
|
||||
self.ensure_one()
|
||||
return self.env['stock.location'].search([
|
||||
('id', 'child_of', self.location_id.id)])
|
||||
|
||||
Reference in New Issue
Block a user