mirror of
https://github.com/OCA/contract.git
synced 2025-02-13 17:57:24 +02:00
[FIX] subscription_oca: product-subscription_template company issues
Make company required on subscription_template. Make subcription_template_id a company-dependent field on product_template.
This commit is contained in:
14
subscription_oca/migrations/14.0.2.0.0/post-migrate.py
Normal file
14
subscription_oca/migrations/14.0.2.0.0/post-migrate.py
Normal file
@@ -0,0 +1,14 @@
|
||||
from openupgradelib import openupgrade
|
||||
|
||||
|
||||
@openupgrade.migrate()
|
||||
def migrate(env, version):
|
||||
openupgrade.convert_to_company_dependent(
|
||||
env,
|
||||
"product.template",
|
||||
"old_subscription_template_id",
|
||||
"subscription_template_id",
|
||||
)
|
||||
openupgrade.drop_columns(
|
||||
env.cr, [("product_template", "old_subscription_template_id")]
|
||||
)
|
||||
Reference in New Issue
Block a user