-
-
Notifications
You must be signed in to change notification settings - Fork 702
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
dd2f051
commit 3daf597
Showing
5 changed files
with
63 additions
and
2 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,7 +1,7 @@ | ||
<?xml version='1.0' encoding='utf-8'?> | ||
<odoo> | ||
<record id="delivery_carrier_comp_rule" model="ir.rule"> | ||
<field name="active"/> | ||
<field name="active" eval="True"/> | ||
<field name="domain_force"> ['|', ('company_id', 'in', company_ids), ('company_id', '=', False)]</field> | ||
</record> | ||
</odoo> |
27 changes: 27 additions & 0 deletions
27
addons/delivery/migrations/13.0.1.0/openupgrade_analysis_work.txt
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 @@ | ||
---Models in module 'delivery'--- | ||
new model choose.delivery.carrier [transient] | ||
# NOTHING TO DO | ||
|
||
---Fields in module 'delivery'--- | ||
delivery / delivery.carrier / get_return_label_from_portal (boolean): NEW | ||
delivery / delivery.carrier / invoice_policy (selection) : NEW required, selection_keys: ['estimated', 'real'], req_default: function, hasdefault | ||
delivery / delivery.carrier / margin (integer) : type is now 'float' ('integer') | ||
delivery / delivery.carrier / return_label_on_delivery (boolean): NEW | ||
delivery / sale.order / delivery_price (float) : DEL | ||
delivery / sale.order / invoice_shipping_on_delivery (boolean): DEL | ||
# NOTHING TO DO | ||
|
||
delivery / sale.order / recompute_delivery_price (boolean): NEW | ||
# DONE: post-migration: marked as True if it has carrier | ||
|
||
---XML records in module 'delivery'--- | ||
NEW ir.ui.view: delivery.choose_delivery_carrier_view_form | ||
NEW ir.ui.view: delivery.product_template_hs_code | ||
NEW ir.ui.view: delivery.sale_order_portal_content_inherit_sale_stock_inherit_website_sale_delivery | ||
NEW ir.ui.view: delivery.vpicktree_view_tree | ||
DEL ir.ui.view: delivery.assets_backend | ||
DEL ir.ui.view: delivery_hs_code.product_template_hs_code | ||
# NOTHING TO DO | ||
|
||
DEL mail.template: delivery.mail_template_data_delivery_confirmation [renamed to stock module] (noupdate) | ||
# NOTHING TO DO: handled in stock |
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,19 @@ | ||
# Copyright 2020 ForgeFlow <http://www.forgeflow.com> | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). | ||
from openupgradelib import openupgrade | ||
|
||
|
||
def fill_sale_order_recompute_delivery_price(env): | ||
openupgrade.logged_query( | ||
env.cr, """ | ||
UPDATE sale_order | ||
SET recompute_delivery_price = TRUE | ||
WHERE carrier_id IS NOT NULL""" | ||
) | ||
|
||
|
||
@openupgrade.migrate() | ||
def migrate(env, version): | ||
fill_sale_order_recompute_delivery_price(env) | ||
openupgrade.load_data( | ||
env.cr, "delivery", "migrations/13.0.1.0/noupdate_changes.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Copyright 2020 ForgeFlow <http://www.forgeflow.com> | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). | ||
from openupgradelib import openupgrade | ||
|
||
|
||
_column_renames = { | ||
'sale_order': [ | ||
('delivery_price', None), # save value just in case | ||
], | ||
} | ||
|
||
|
||
@openupgrade.migrate() | ||
def migrate(env, version): | ||
openupgrade.rename_columns(env.cr, _column_renames) |
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