mirror of
https://github.com/NaN-tic/tryton-upgrades.git
synced 2023-12-14 03:32:55 +01:00
Set null account/taxes product categories
This commit is contained in:
parent
ce7b343706
commit
08095594ec
|
@ -96,6 +96,22 @@ with Transaction().start(dbname, 1, context=context):
|
|||
if to_write:
|
||||
Template.write(*to_write)
|
||||
|
||||
logger.info('%s: Upgrading Account Categories' % (company.rec_name))
|
||||
|
||||
for category in Category.search([('accounting', '=', False)]):
|
||||
category.account_expense = None
|
||||
category.account_revenue = None
|
||||
category.save()
|
||||
|
||||
query = "DROP TABLE if exists product_customer_taxes_rel;"
|
||||
cursor.execute(query)
|
||||
query = "DROP TABLE if exists product_supplier_taxes_rel;"
|
||||
cursor.execute(query)
|
||||
query = "DROP TABLE if exists product_category_customer_taxes_rel;"
|
||||
cursor.execute(query)
|
||||
query = "DROP TABLE if exists product_category_supplier_taxes_rel;"
|
||||
cursor.execute(query)
|
||||
|
||||
Transaction().cursor.commit()
|
||||
|
||||
logger.info('Done')
|
||||
|
|
|
@ -406,11 +406,6 @@ after:
|
|||
query: DELETE from res_user where login in ('user_cron_purchase_request', 'user_cron_internal_shipment');
|
||||
DELETE from ir_model_data where module = 'stock_supply' and model = 'res.user';
|
||||
|
||||
- comment: # Drop customer/taxes tables don't use
|
||||
version: 5.0
|
||||
query: DROP TABLE if exists product_customer_taxes_rel;
|
||||
DROP TABLE if exists product_supplier_taxes_rel;
|
||||
|
||||
# - comment: # upgrade configuration models from ir_property
|
||||
# version: 4.8
|
||||
# script: ./upgrades/after/migration_properties.py
|
||||
|
|
Loading…
Reference in a new issue