Files
tryton-db-migration/data/6.6/product.json
T

305 lines
11 KiB
JSON

{
"version": "6.6",
"module": "product",
"files": [
{
"module": "product",
"file": "configuration.py",
"class": "ConfigurationDefaultCostPriceMethod",
"method": "__register__",
"line": 54,
"operations": [
{
"object": "backend.TableHandler",
"operation": "table_exist",
"tables": [
"product_configuration_default_cost_price_method"
],
"line": 55,
"args": [
"cls._table"
],
"kwargs": {},
"code": "backend.TableHandler.table_exist(cls._table)",
"phase": "before_super"
}
]
},
{
"module": "product",
"file": "product.py",
"class": "Product",
"method": "__register__",
"line": 444,
"operations": [
{
"object": "cursor",
"operation": "execute",
"tables": [
"product_product"
],
"line": 455,
"args": [
"*table.update([table.suffix_code], [table.code])"
],
"kwargs": {},
"code": "(Transaction().connection.cursor()).execute(*table.update(\n [table.suffix_code],\n [table.code]))",
"phase": "after_super",
"condition": "fill_suffix_code"
},
{
"object": "table",
"operation": "update",
"tables": [
"product_product"
],
"line": 455,
"args": [
"[table.suffix_code]",
"[table.code]"
],
"kwargs": {},
"code": "table.update(\n [table.suffix_code],\n [table.code])",
"phase": "after_super",
"condition": "fill_suffix_code"
}
]
},
{
"module": "product",
"file": "product.py",
"class": "ProductListPrice",
"method": "__register__",
"line": 677,
"operations": [
{
"object": "backend.TableHandler",
"operation": "table_exist",
"tables": [
"product_list_price"
],
"line": 678,
"args": [
"cls._table"
],
"kwargs": {},
"code": "backend.TableHandler.table_exist(cls._table)",
"phase": "before_super"
}
]
},
{
"module": "product",
"file": "product.py",
"class": "ProductCostPriceMethod",
"method": "__register__",
"line": 708,
"operations": [
{
"object": "backend.TableHandler",
"operation": "table_exist",
"tables": [
"product_cost_price_method"
],
"line": 715,
"args": [
"cls._table"
],
"kwargs": {},
"code": "backend.TableHandler.table_exist(cls._table)",
"phase": "before_super"
},
{
"object": "backend.TableHandler",
"operation": "table_exist",
"tables": [],
"line": 716,
"args": [
"ProductCostPrice._table"
],
"kwargs": {},
"code": "backend.TableHandler.table_exist(\n ProductCostPrice._table)",
"phase": "before_super"
},
{
"object": "cursor",
"operation": "execute",
"tables": [
"product_cost_price_method",
"product_cost_price"
],
"line": 730,
"args": [
"*sql_table.insert(columns=[Column(sql_table, c) for c in columns], values=cost_price.select(*[Column(cost_price, c) for c in columns]))"
],
"kwargs": {},
"code": "(Transaction().connection.cursor()).execute(*sql_table.insert(\n columns=[Column(sql_table, c) for c in columns],\n values=cost_price.select(\n *[Column(cost_price, c) for c in columns])))",
"phase": "after_super",
"condition": "cost_price_table.column_exist('template')"
},
{
"object": "sql_table",
"operation": "insert",
"tables": [
"product_cost_price_method",
"product_cost_price"
],
"line": 730,
"args": [],
"kwargs": {
"columns": "[Column(sql_table, c) for c in columns]",
"values": "cost_price.select(*[Column(cost_price, c) for c in columns])"
},
"code": "sql_table.insert(\n columns=[Column(sql_table, c) for c in columns],\n values=cost_price.select(\n *[Column(cost_price, c) for c in columns]))",
"phase": "after_super",
"condition": "cost_price_table.column_exist('template')"
},
{
"object": "cost_price",
"operation": "select",
"tables": [
"product_cost_price"
],
"line": 732,
"args": [
"*[Column(cost_price, c) for c in columns]"
],
"kwargs": {},
"code": "cost_price.select(\n *[Column(cost_price, c) for c in columns])",
"phase": "after_super",
"condition": "cost_price_table.column_exist('template')"
}
]
},
{
"module": "product",
"file": "product.py",
"class": "ProductCostPrice",
"method": "__register__",
"line": 772,
"operations": [
{
"object": "backend.TableHandler",
"operation": "table_exist",
"tables": [
"product_cost_price"
],
"line": 779,
"args": [
"cls._table"
],
"kwargs": {},
"code": "backend.TableHandler.table_exist(cls._table)",
"phase": "before_super"
},
{
"object": "table",
"operation": "add_column",
"tables": [
"product_cost_price"
],
"line": 786,
"args": [
"'template'",
"'INTEGER'"
],
"kwargs": {},
"code": "table.add_column('template', 'INTEGER')",
"phase": "after_super",
"condition": "not exist"
},
{
"object": "cursor",
"operation": "execute",
"tables": [
"product_cost_price"
],
"line": 793,
"args": [
"*sql_table.insert(columns=[Column(sql_table, c) for c in columns] + [sql_table.product], values=sql_table.join(product, condition=sql_table.template == product.template).select(*[Column(sql_table, c) for c in columns] + [product.id], where=(sql_table.template != Null) & (sql_table.product == Null)))"
],
"kwargs": {},
"code": "(Transaction().connection.cursor()).execute(*sql_table.insert(\n columns=[Column(sql_table, c) for c in columns]\n + [sql_table.product],\n values=sql_table.join(product,\n condition=sql_table.template == product.template\n ).select(\n *[Column(sql_table, c) for c in columns]\n + [product.id],\n where=(sql_table.template != Null)\n & (sql_table.product == Null))))",
"phase": "after_super",
"condition": "table.column_exist('template')"
},
{
"object": "sql_table",
"operation": "insert",
"tables": [
"product_cost_price"
],
"line": 793,
"args": [],
"kwargs": {
"columns": "[Column(sql_table, c) for c in columns] + [sql_table.product]",
"values": "sql_table.join(product, condition=sql_table.template == product.template).select(*[Column(sql_table, c) for c in columns] + [product.id], where=(sql_table.template != Null) & (sql_table.product == Null))"
},
"code": "sql_table.insert(\n columns=[Column(sql_table, c) for c in columns]\n + [sql_table.product],\n values=sql_table.join(product,\n condition=sql_table.template == product.template\n ).select(\n *[Column(sql_table, c) for c in columns]\n + [product.id],\n where=(sql_table.template != Null)\n & (sql_table.product == Null)))",
"phase": "after_super",
"condition": "table.column_exist('template')"
},
{
"object": "sql_table.join(product, condition=sql_table.template == product.template)",
"operation": "select",
"tables": [],
"line": 796,
"args": [
"*[Column(sql_table, c) for c in columns] + [product.id]"
],
"kwargs": {
"where": "(sql_table.template != Null) & (sql_table.product == Null)"
},
"code": "sql_table.join(product,\n condition=sql_table.template == product.template\n ).select(\n *[Column(sql_table, c) for c in columns]\n + [product.id],\n where=(sql_table.template != Null)\n & (sql_table.product == Null))",
"phase": "after_super",
"condition": "table.column_exist('template')"
},
{
"object": "cursor",
"operation": "execute",
"tables": [
"product_cost_price"
],
"line": 803,
"args": [
"*sql_table.delete(where=(sql_table.template != Null) & (sql_table.product == Null))"
],
"kwargs": {},
"code": "(Transaction().connection.cursor()).execute(*sql_table.delete(\n where=(sql_table.template != Null)\n & (sql_table.product == Null)))",
"phase": "after_super",
"condition": "table.column_exist('template')"
},
{
"object": "sql_table",
"operation": "delete",
"tables": [
"product_cost_price"
],
"line": 803,
"args": [],
"kwargs": {
"where": "(sql_table.template != Null) & (sql_table.product == Null)"
},
"code": "sql_table.delete(\n where=(sql_table.template != Null)\n & (sql_table.product == Null))",
"phase": "after_super",
"condition": "table.column_exist('template')"
},
{
"object": "table",
"operation": "drop_column",
"tables": [
"product_cost_price"
],
"line": 806,
"args": [
"'template'"
],
"kwargs": {},
"code": "table.drop_column('template')",
"phase": "after_super",
"condition": "table.column_exist('template')"
}
]
}
]
}