diff --git a/product_cost_price_migration.diff b/product_cost_price_migration.diff new file mode 100644 index 0000000..e26525c --- /dev/null +++ b/product_cost_price_migration.diff @@ -0,0 +1,13 @@ +diff --git a/tryton/modules/product/product.py b/tryton/modules/product/product.py +index e46f608dcb..13d04d0212 100644 +--- a/tryton/modules/product/product.py ++++ b/tryton/modules/product/product.py +@@ -806,7 +806,7 @@ class ProductCostPrice(ModelSQL, CompanyValueMixin): + # Migration from 4.4: replace template by product + if table.column_exist('template'): + columns = ['create_uid', 'create_date', +- 'write_uid', 'write_date', 'cost_price'] ++ 'write_uid', 'write_date', 'cost_price', 'company'] + cursor.execute(*sql_table.insert( + columns=[Column(sql_table, c) for c in columns] + + [sql_table.product], diff --git a/sale_supply_supply_on_sale.diff b/sale_supply_supply_on_sale.diff new file mode 100644 index 0000000..5c27fb3 --- /dev/null +++ b/sale_supply_supply_on_sale.diff @@ -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): diff --git a/sequence_exist.diff b/sequence_exist.diff new file mode 100644 index 0000000..38d443d --- /dev/null +++ b/sequence_exist.diff @@ -0,0 +1,24 @@ +diff --git a/tryton/trytond/trytond/backend/postgresql/database.py b/tryton/trytond/trytond/backend/postgresql/database.py +index 3c891d48f3..e5ef92947c 100644 +--- a/tryton/trytond/trytond/backend/postgresql/database.py ++++ b/tryton/trytond/trytond/backend/postgresql/database.py +@@ -676,13 +676,12 @@ class Database(DatabaseInterface): + + def sequence_exist(self, connection, name): + cursor = connection.cursor() +- for schema in self.search_path: +- cursor.execute('SELECT 1 ' +- 'FROM information_schema.sequences ' +- 'WHERE sequence_name = %s AND sequence_schema = %s', +- (name, schema)) +- if cursor.rowcount: +- return True ++ cursor.execute('SELECT 1 ' ++ 'FROM pg_sequences ' ++ 'WHERE sequencename = %s', ++ (name,)) ++ if cursor.rowcount: ++ return True + return False + + def sequence_create( diff --git a/series b/series index 7669a03..1d20315 100644 --- a/series +++ b/series @@ -67,3 +67,9 @@ issue12799.diff # [sao] Convert negative id value as None when set by the client issue12547.diff # [stock_lot] Check lot required only when changing move to done issue12823.diff # [account] Use 0 as fallback for missing debit or credit in on_change functions + +product_cost_price_migration.diff # [product] Add missing column in product_cost_price + +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.