mirror of
https://github.com/OCA/manufacture.git
synced 2025-01-28 16:37:15 +02:00
* When passing back to draft mantain active according to company definition * SQL sentence for state update in post-init-hook. * _bom_find with context state so that only those in state=active are taken into account * Tests * api.one deprecated [IMP] <mrp_bom_version> Little required changes [IMP] <mrp_bom_version> from api.one to api.multi [IMP] <mrp_bom_version> New tests added
13 lines
369 B
Python
13 lines
369 B
Python
# -*- coding: utf-8 -*-
|
|
# (c) 2015 Oihane Crucelaegui - AvanzOSC
|
|
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
|
|
|
|
from . import models
|
|
|
|
|
|
def set_active_bom_active_state(cr, registry):
|
|
"""Set those active BoMs to state 'active'"""
|
|
cr.execute("""UPDATE mrp_bom
|
|
SET state = 'active'
|
|
WHERE active = True""")
|