mirror of
https://github.com/OCA/contract.git
synced 2025-02-13 17:57:24 +02:00
Make company required on subscription_template. Make subcription_template_id a company-dependent field on product_template.
15 lines
367 B
Python
15 lines
367 B
Python
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")]
|
|
)
|