Remove already applied patch.

Add new patch in sale_supply to migrate.

Task #159227
This commit is contained in:
Juanjo Garcia 2023-12-13 15:17:03 +01:00
parent b99ddd17fe
commit f83eb8c5ca
3 changed files with 22 additions and 18 deletions

View File

@ -0,0 +1,20 @@
diff --git a/product.py b/product.py
index 08537ed..34ccc24 100644
--- a/tryton/modules/sale_supply/product.py
+++ b/tryton/modules/sale_supply/product.py
@@ -45,6 +56,7 @@ class Template(metaclass=PoolMeta):
super().__register__(module)
+ '''
# Migration from 6.6: convert supply_on_sale from boolean to selection
if migrate_supply_on_sale:
cursor.execute(*table.update(
@@ -58,6 +70,7 @@ class Template(metaclass=PoolMeta):
['always'],
where=h_table._temp_supply_on_sale == Literal(True)))
h_table_h.drop_column('_temp_supply_on_sale')
+ '''
@fields.depends(methods=['_notify_order_point'])
def on_change_notify(self):

4
series
View File

@ -64,6 +64,6 @@ sao_document_field.diff # [sao] fix issue with loading of 'document' fields in s
product_cost_price_migration.diff # [product] Add missing column in product_cost_price
table_rename.diff # [trytond] Add missing sequence rename in table_rename function
sequence_exist.diff # [trytond] Search sequences using pg_sequences instead of information_schema.sequences
sale_supply_supply_on_sale.diff # [sale_supply] Dont try to supply_on_sale field selection.

View File

@ -1,16 +0,0 @@
diff --git a/tryton/trytond/trytond/backend/postgresql/table.py b/tryton/trytond/trytond/backend/postgresql/table.py
index e874ee61c0..769f07ccd5 100644
--- a/tryton/trytond/trytond/backend/postgresql/table.py
+++ b/tryton/trytond/trytond/backend/postgresql/table.py
@@ -132,6 +132,11 @@ class TableHandler(TableHandlerInterface):
and not cls.table_exist(new_name)):
cursor.execute(SQL('ALTER TABLE {} RENAME TO {}').format(
Identifier(old_name), Identifier(new_name)))
+ # Migrate from 6.6: rename old sequence
+ old_sequence = old_name + '_id_seq'
+ new_sequence = new_name + '_id_seq'
+ transaction.database.sequence_rename(
+ transaction.connection, old_sequence, new_sequence)
# Rename history table
old_history = old_name + "__history"
new_history = new_name + "__history"