Bugs
Premigració a 3.4
SQL
1. Purchase
Eliminar el context "{'type': 'in_invoice'}" de act_invoice_form (si el té afegit)
select * from ir_action_act_window where context = '{''type'': ''in_invoice''}' and domain like '%purchase.line%'; update ir_action_act_window set context = '{}' where id = XXXX; # detectar quin ID te.
2. Mòduls deprecated que s'han d'eliminar abans de migrar:
select * from ir_module_module where name in ('asset_invoice', 'account_bank_statement_user', 'asterisk', 'aeat_349_es', 'aeat_303_es', 'aeat_340_es', 'activity_calendar', 'account_budget', 'carrier_file', 'file_format', 'account_dunning_mail', 'account_invoice_information_uom', 'asset_maintenance', 'asset', 'asset_manufacturer', 'account_invoice_order_number', 'asset_vehicle', 'asset_relationship', 'asset_attribute', 'account_invoice_milestone', 'asset_owner', 'account_invoice_buttons', 'asset_guarantee', 'commission_partial_payment', 'party_asterisk', 'asset_work_shipment', 'product_kit_cost', 'shipment_work', 'purchase_contract', 'product_cost_plan_margin', 'stock_lot_cost', 'purchase_lot_cost', 'product_cost_plan', 'sale_shipment_cost_prices', 'sale_pos_esc', 'stock_lot_sequence', 'stock_lot_supplier_ref', 'purchase_information_uom', 'stock_lot_manufacturer', 'product_esale_purchasable', 'product_esale_manufacturer', 'production_origin', 'production_supply_request', 'product_brand', 'production_editable_tree', 'production_split', 'sale_buttons', 'product_name', 'stock_split_lot_expiry', 'stock_scanner_lot', 'timetracker', 'work_project', 'stock_scanner', 'stock_supply_request'); delete from ir_module_module_dependency where module in (select * from ir_module_module where name in ('asset_invoice', 'account_bank_statement_user', 'asterisk', 'aeat_349_es', 'aeat_303_es', 'aeat_340_es', 'activity_calendar', 'account_budget', 'carrier_file', 'file_format', 'account_dunning_mail', 'account_invoice_information_uom', 'asset_maintenance', 'asset', 'asset_manufacturer', 'account_invoice_order_number', 'asset_vehicle', 'asset_relationship', 'asset_attribute', 'account_invoice_milestone', 'asset_owner', 'account_invoice_buttons', 'asset_guarantee', 'commission_partial_payment', 'party_asterisk', 'asset_work_shipment', 'product_kit_cost', 'shipment_work', 'purchase_contract', 'product_cost_plan_margin', 'stock_lot_cost', 'purchase_lot_cost', 'product_cost_plan', 'sale_shipment_cost_prices', 'sale_pos_esc', 'stock_lot_sequence', 'stock_lot_supplier_ref', 'purchase_information_uom', 'stock_lot_manufacturer', 'product_esale_purchasable', 'product_esale_manufacturer', 'production_origin', 'production_supply_request', 'product_brand', 'production_editable_tree', 'production_split', 'sale_buttons', 'product_name', 'stock_split_lot_expiry', 'stock_scanner_lot', 'timetracker', 'work_project', 'stock_scanner', 'stock_supply_request')); delete from ir_module_module where name in ('asset_invoice', 'account_bank_statement_user', 'asterisk', 'aeat_349_es', 'aeat_303_es', 'aeat_340_es', 'activity_calendar', 'account_budget', 'carrier_file', 'file_format', 'account_dunning_mail', 'account_invoice_information_uom', 'asset_maintenance', 'asset', 'asset_manufacturer', 'account_invoice_order_number', 'asset_vehicle', 'asset_relationship', 'asset_attribute', 'account_invoice_milestone', 'asset_owner', 'account_invoice_buttons', 'asset_guarantee', 'commission_partial_payment', 'party_asterisk', 'asset_work_shipment', 'product_kit_cost', 'shipment_work', 'purchase_contract', 'product_cost_plan_margin', 'stock_lot_cost', 'purchase_lot_cost', 'product_cost_plan', 'sale_shipment_cost_prices', 'sale_pos_esc', 'stock_lot_sequence', 'stock_lot_supplier_ref', 'purchase_information_uom', 'stock_lot_manufacturer', 'product_esale_purchasable', 'product_esale_manufacturer', 'production_origin', 'production_supply_request', 'product_brand', 'production_editable_tree', 'production_split', 'sale_buttons', 'product_name', 'stock_split_lot_expiry', 'stock_scanner_lot', 'timetracker', 'work_project', 'stock_scanner', 'stock_supply_request');
Migració 3.4 a 3.6
- pip install python-sql --upgrade
Pendents de migrar
- Analytic Product
Fitxer de configuració
- Unificar les variables en el fitxer de configuració
price_digits = (16, config.getint('product', 'price_decimal', default=4))
Revisar migracions per defecte siguin correctes o interferir tercers mòduls
Allow to define many relativedelta on payment term http://hg.tryton.org/modules/account_invoice/rev/8cc87997ccea#l3.160 Els terminis de pagament van a un nou model
Errors upgrade
1. Error XML act_invoice_form
234 | [('lines.origin.purchase.id', 'in', Eval('active_ids'), 'purchase.line')] | 2013-11-25 13:03:20.256361 | 2014-09-03 19:28:27.604031 | account.invoice | [] | 0 | 0 | {'type': 'in_invoice'} | t | 0 | 234 | update ir_action_act_window set context = '{}' where id = 234;
Post Update
CSV Import
- Instal·lat tb csv_purchase si importen compres.
SQL
Galatea Blog: update galatea_blog_comment set comment_create_date = create_date; Gatalea Photoalbum: update galatea_photoalbum_comment set comment_create_date = create_date; Gataleta Tutorial: update galatea_tutorial_comment set comment_create_date = create_date;
Canvi formules tarifes
1- General:
Abans:
product.list_price * (1 + 0) + (0)
Ara:
getattr(product, 'list_price') * (1 + 0) + (0)
update product_price_list_line as p set formula=replace(formula, 'product.list_price', 'getattr(product, "list_price")');
2- Preu llista associat a una altra llista de preus:
Abans:
price_list.compute_price_list(34)*1
Ara:
price_list(34)*1
3- Preu amb special price
Abans:
product.special_price>0 and product.special_price or product.list_price * (1 + -0.15)
Ara:
getattr(product, 'special_price') if getattr(product, 'special_price') > 0 else getattr(product, 'list_price') * (1 + -0.15)
Codi
- Canvi API on_change:
- Revisar el on_change_product que retornava un dict i afegiem els camps en un obj. Si es un obj potser no cal ja aquesta part (hi han varis llocs que es fa):
- Número de dígits: nou paràmetre al fitxer de configuració:
Save multiple: CountryZip.save([record1, record2, ..., recordX])
Canvi logging to logger, encara que a mi m'agrada més loggind doncs queda tota la ruta del modul+fitxer https://bugs.tryton.org/issue4458
PYSON: Les expresions Eval en XML ja no es fan. Passen a codi python (o es 3.8?) https://groups.google.com/forum/#!topic/tryton/Mrrp_R5f8p8
Es pot veure un codi ja migrat: https://bitbucket.org/zikzakmedia/trytond-smtp/pull-request/5/fix-deprecation-colors-attibute-on-xml/diff
Price Digits. Ja no cal definir el número de digits en el fitxer de configuració. Podem usar en el fitxer configuració els digits per price_decimal. Exemple: http://hg.tryton.org/modules/purchase/file/a815271adfc7/purchase.py#l23
price_digits = (16, config.getint('product', 'price_decimal', default=4))
- Podem fer algu similar amb els digits del DISCOUNT
Remove safe_eval http://hg.tryton.org/trytond/rev/8c3da23d1fb4
Diria que es simplement reemplaçar safe_eval per eval i treure l'import. Exemple: https://bitbucket.org/zikzakmedia/trytond-babi/commits/8d0c6881ed56475ad00dfca8dafa711a7e0b3abc
Account Invoice: http://hg.tryton.org/modules/account_invoice?cmd=changeset;node=6ed0f06ce66b
Sale: http://hg.tryton.org/modules/sale?cmd=changeset;node=4dca378b9142
Stock: http://hg.tryton.org/modules/stock?cmd=changeset;node=3b39258d1f16
- ...
- Elimina spell="Eval(party_lang)" en els XMLs
- Exemples:
- Revisar càlcul de tarifes:
- Valorar canviar "carrier formula" també amb simpleeval
- Date Time. Canvi en el widget:
+ <field name="date" widget="date"/> + <field name="date" widget="time" string="Time"/>
Better Binary support (no ha entrat o revisar si ha entrat). Canvia la forma de carregar els fitxers que passa de buffer a binary https://bugs.tryton.org/issue4637
- Account Statement:
create_move retrn moves http://hg.tryton.org/modules/account_statement/rev/80c029a002f8
create_move has moved from Line to Statement Exemple: http://hg.tryton.org/modules/account_payment_clearing/rev/4112eb10a69f
Stock Lot: Ha canviat el nom de la pàgina. Revisar qui fa inherit i canviar pel nou nom: http://hg.tryton.org/modules/stock_lot/file/9688e062aa97/view/template_form.xml
- Orígen de la venda i compra. Ja podem saber el orígin en una venda o compra. Revisar que algún mètode que inherit retorni bé i no faci codi extra:
Add tox and drone: http://hg.tryton.org/modules/party?cmd=changeset;node=5d5356609a9d
Ja fixat
Tryton set focus: http://hg.tryton.org/tryton?cmd=changeset;node=826e1cf6496c Per tant, ja no caldria: https://bitbucket.org/zikzakmedia/trytond-patchs/src/033a9bad113a5aba4e4c87c6b413bef9ac01fcd3/tryton-4013.patch?at=3.4
Issues per entrar a la branca zz3.6
Mòduls
Sale Shipment Cost. Canvi de diccionari a objecte per calcular el cost: http://home.zikzakmedia.com/tryton/sale_shipment_cost/rev/6c450b4b2de0#l1.39
Account ES / PyME
- Camp kind d'alguns comptes pq pugin ser triats com a dipòsit
Babi
- Aplicar a zz3.6 commits de default: