Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ADD] 14.0 - delivery - migration done #3299

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docsource/modules130-140.rst
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ Module coverage 13.0 -> 14.0
+--------------------------------------------+-------------------------------------------------+
|crm_sms | Done |
+--------------------------------------------+-------------------------------------------------+
|delivery | |
|delivery | Done |
+--------------------------------------------+-------------------------------------------------+
|digest | Done |
+--------------------------------------------+-------------------------------------------------+
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
<?xml version='1.0' encoding='utf-8'?>
<odoo>
<record id="delivery_carrier_comp_rule" model="ir.rule">
<field name="global"/>
<!-- Writing global is useless, a it is a computed field -->
<!-- <field name="global"/> -->
</record>
<record id="product_product_delivery" model="product.product">
<field name="invoice_policy">order</field>
<!-- do not change value that is valid and can be used in production -->
<!-- <field name="invoice_policy">order</field> -->
</record>
</odoo>
14 changes: 14 additions & 0 deletions openupgrade_scripts/scripts/delivery/14.0.1.0/pre-migration.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Copyright (C) 2022 - Today: GRAP (http://www.grap.coop)
# @author: Sylvain LE GAL (https://twitter.com/legalsylvain)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

from openupgradelib import openupgrade

_field_renames = [
("product.packaging", "product_packaging", "length", "packaging_length")
]


@openupgrade.migrate()
def migrate(env, version):
openupgrade.rename_fields(env, _field_renames)
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---Models in module 'delivery'---
---Fields in module 'delivery'---
delivery / product.packaging / length (integer) : DEL
delivery / product.packaging / packaging_length (integer) : NEW
# Done. length renamed into packaging_length in pre-migration script

delivery / stock.picking / volume (float) : DEL

---XML records in module 'delivery'---
NEW ir.model.access: delivery.access_choose_delivery_carrier
NEW ir.model.access: delivery.access_choose_delivery_package
ir.model.constraint: delivery.constraint_product_packaging_positive_length (changed definition: is now 'check(packaging_length>=0)' ('check(length>=0)'))
NEW ir.ui.view: delivery.delivery_stock_report_delivery_no_package_section_line
NEW ir.ui.view: delivery.stock_report_delivery_aggregated_move_lines_inherit_delivery
NEW ir.ui.view: delivery.stock_report_delivery_has_serial_move_line_inherit_delivery
NEW ir.ui.view: delivery.stock_report_delivery_package_section_line_inherit_delivery
# Nothing to do.