frePPLe / odoo

Odoo addon to integrate frepple's advanced production planning, forecasting and inventory planning.
MIT License
29 stars 39 forks source link

[FIX] frepple: Export of manufacturing orders #7

Closed max3903 closed 3 years ago

max3903 commented 3 years ago

@jdetaeye This is ready to be reviewed. Thanks!

jdetaeye commented 3 years ago

As usual, this varies a bit by odoo release...

For odoo 12 we want to extract "confirmed", "planned", "progress". So, your pull request is valid.

https://github.com/odoo/odoo/blob/2529ab67e21637b5e56bbb771920db8e4d6fe04c/addons/mrp/models/mrp_production.py#L128

state = fields.Selection([
    ('confirmed', 'Confirmed'),
    ('planned', 'Planned'),
    ('progress', 'In Progress'),
    ('done', 'Done'),
    ('cancel', 'Cancelled')], string='State',
    copy=False, default='confirmed', track_visibility='onchange')

For odoo 13, we want to extract "confirmed", "planned" and "progress"

https://github.com/odoo/odoo/blob/708891a9637e03c8feb895fba3c363ebd0a6004c/addons/mrp/models/mrp_production.py#L139

state = fields.Selection([
    ('draft', 'Draft'),
    ('confirmed', 'Confirmed'),
    ('planned', 'Planned'),
    ('progress', 'In Progress'),
    ('to_close', 'To Close'),
    ('done', 'Done'),
    ('cancel', 'Cancelled')], string='State',
    compute='_compute_state', copy=False, index=True, readonly=True,
    store=True, tracking=True,
    help=" * Draft: The MO is not confirmed yet.\n"
         " * Confirmed: The MO is confirmed, the stock rules and the reordering of the components are trigerred.\n"
         " * Planned: The WO are planned.\n"
         " * In Progress: The production has started (on the MO or on the WO).\n"
         " * To Close: The production is done, the MO has to be closed.\n"
         " * Done: The MO is closed, the stock moves are posted. \n"
         " * Cancelled: The MO has been cancelled, can't be confirmed anymore.")

For odoo 14, we want to extract "confirmed" and "progress".

https://github.com/odoo/odoo/blob/d347eae1646639e2b346d404d1eb68ce9eac005c/addons/mrp/models/mrp_production.py#L167

state = fields.Selection([
    ('draft', 'Draft'),
    ('confirmed', 'Confirmed'),
    ('progress', 'In Progress'),
    ('to_close', 'To Close'),
    ('done', 'Done'),
    ('cancel', 'Cancelled')], string='State',
    compute='_compute_state', copy=False, index=True, readonly=True,
    store=True, tracking=True,
    help=" * Draft: The MO is not confirmed yet.\n"
         " * Confirmed: The MO is confirmed, the stock rules and the reordering of the components are trigerred.\n"
         " * In Progress: The production has started (on the MO or on the WO).\n"
         " * To Close: The production is done, the MO has to be closed.\n"
         " * Done: The MO is closed, the stock moves are posted. \n"
         " * Cancelled: The MO has been cancelled, can't be confirmed anymore.")