-
Notifications
You must be signed in to change notification settings - Fork 247
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[IMP] product_packaging_through_attributes: updated code to OCA standard
* sale_packaging_info: required changes and OCA standard adapt * purchase_packaging_info: required changes and OCA standard adapt
- Loading branch information
Showing
16 changed files
with
189 additions
and
111 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
==================================== | ||
Product Packaging through Attributes | ||
==================================== | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,15 +18,15 @@ | |
|
||
{ | ||
"name": "Product Packaging through Attributes", | ||
"version": "1.0", | ||
"version": "8.0.1.1.0", | ||
"depends": [ | ||
"base", | ||
"product", | ||
"product_packaging_views", | ||
"product_attribute_types", | ||
], | ||
"author": "OdooMRP team," | ||
"AvanzOSC," | ||
"author": "OdooMRP team, " | ||
"AvanzOSC, " | ||
"Serv. Tecnol. Avanzados - Pedro M. Baeza", | ||
"website": "http://www.odoomrp.com", | ||
"contributors": [ | ||
|
@@ -35,7 +35,6 @@ | |
"Ana Juaristi <[email protected]>" | ||
], | ||
"category": "Custom Module", | ||
"summary": "", | ||
"data": [ | ||
"views/product_view.xml", | ||
"views/res_partner_view.xml", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
product_packaging_through_attributes/migrations/8.0.1.1.0/pre-migration.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# -*- coding: utf-8 -*- | ||
# © 2016 Oihane Crucelaegui - AvanzOSC | ||
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html | ||
|
||
|
||
def update_columns(cr): | ||
cr.execute( | ||
""" | ||
ALTER TABLE product_attribute_value | ||
RENAME COLUMN package_product TO package_product_id | ||
""") | ||
cr.execute( | ||
""" | ||
ALTER TABLE product_packaging | ||
RENAME COLUMN product TO product_id | ||
""") | ||
cr.execute( | ||
""" | ||
ALTER TABLE res_partner | ||
RENAME COLUMN partner_product_ul TO partner_product_ul_id | ||
""") | ||
|
||
|
||
def migrate(cr, version): | ||
if not version: | ||
return | ||
update_columns(cr) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
purchase_packaging_info/migrations/8.0.1.1.0/pre-migration.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# -*- coding: utf-8 -*- | ||
# © 2016 Oihane Crucelaegui - AvanzOSC | ||
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html | ||
|
||
|
||
def update_columns(cr): | ||
cr.execute( | ||
""" | ||
ALTER TABLE purchase_order | ||
RENAME COLUMN product_ul TO product_ul_id | ||
""") | ||
cr.execute( | ||
""" | ||
ALTER TABLE purchase_order_line | ||
RENAME COLUMN sec_pack TO sec_pack_id | ||
""") | ||
|
||
|
||
def migrate(cr, version): | ||
if not version: | ||
return | ||
update_columns(cr) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# -*- coding: utf-8 -*- | ||
# © 2016 Oihane Crucelaegui - AvanzOSC | ||
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html | ||
|
||
|
||
def update_columns(cr): | ||
cr.execute( | ||
""" | ||
ALTER TABLE sale_order | ||
RENAME COLUMN product_ul TO product_ul_id | ||
""") | ||
cr.execute( | ||
""" | ||
ALTER TABLE sale_order_line | ||
RENAME COLUMN sec_pack TO sec_pack_id | ||
""") | ||
|
||
|
||
def migrate(cr, version): | ||
if not version: | ||
return | ||
update_columns(cr) |
Oops, something went wrong.