18.0_tp #1

Merged
mreul merged 9 commits from 18.0_tp into 18.0 2025-04-07 10:44:13 +00:00
Showing only changes of commit 09864d8513 - Show all commits

View File

@@ -23,3 +23,19 @@ def post_init_hook(env):
'domain': False,
'homepage_url': new_page.url
})
module_ecommerce = env['ir.module.module'].search([('name','=','website_sale')])
if module_ecommerce and module_ecommerce.state == 'installed':
# disable payment options:
for payment_method in env['payment.method'].search([]):
payment_method.write({
'active': False
})
_logger.error(f"________Disable payment method {payment_method.id}")
# Disable products
for product in env['product.template'].search([]):
product.write({
'website_published': False
})
_logger.error(f"________Disable product {product.id}")