fix to migration script for bemade_fsm moving equipment tags
This commit is contained in:
parent
eb6e46b5b6
commit
8007912746
1 changed files with 21 additions and 0 deletions
|
|
@ -33,6 +33,17 @@ def migrate(cr, version):
|
|||
|
||||
_logger.info("Re-creating equipment to tag relations.")
|
||||
# Add the relations
|
||||
# Schema | Name | Type | Owner
|
||||
# --------+---------------------------------------------------+-------+-------
|
||||
# public | bemade_fsm_equipment_bemade_fsm_equipment_tag_rel | table | odoo
|
||||
# public | bemade_fsm_equipment_sale_order_line_rel | table | odoo
|
||||
# public | bemade_fsm_equipment_sale_order_rel | table | odoo
|
||||
# public | bemade_fsm_task_equipment_rel | table | odoo
|
||||
# public | bemade_fsm_task_template_equipment_rel | table | odoo
|
||||
# public | fsm_equipment_fsm_equipment_tag_rel | table | odoo
|
||||
# public | fsm_equipment_sale_order_rel | table | odoo
|
||||
# public | fsm_task_equipment_rel | table | odoo
|
||||
|
||||
cr.execute(
|
||||
"""
|
||||
INSERT INTO fsm_task_equipment_rel (equipment_id, task_id)
|
||||
|
|
@ -40,6 +51,16 @@ def migrate(cr, version):
|
|||
"""
|
||||
)
|
||||
|
||||
cr.execute(
|
||||
"""
|
||||
INSERT INTO fsm_equipment_fsm_equipment_tag_rel (fsm_equipment_id, fsm_equipment_tag_id)
|
||||
SELECT bemade_fsm_equipment_id, bemade_fsm_equipment_tag_id
|
||||
FROM bemade_fsm_equipment_bemade_fsm_equipment_tag_rel
|
||||
"""
|
||||
)
|
||||
|
||||
# Clean up
|
||||
|
||||
_logger.info("Deleting menu items.")
|
||||
cr.execute(
|
||||
"""
|
||||
|
|
|
|||
Loading…
Reference in a new issue