crash al desconciliar asiento o contabilizar factura
lukio opened this issue · 3 comments
lukio commented
Versión: 4.2
Python: 2.7
Tue Jul 16 14:13:59 2019] ERROR:trytond.protocols.dispatcher:.execute(*(2043, {}, u'unreconcile',1, u'active_id': 116875}), **{}) from admin@127.0.0.1//vdb42/ Traceback (most recent call last): File "/opt/trytond/vdb/trytond_dist/trytond/protocols/dispatcher.py", line 163, in _dispatch result = rpc.result(meth(*c_args, **c_kwargs)) File "/opt/trytond/vdb/trytond_dist/trytond/wizard/wizard.py", line 287, in execute return wizard._execute(state_name) File "/opt/trytond/vdb/trytond_dist/trytond/wizard/wizard.py", line 318, in _execute result = self._execute(transition()) File "/opt/trytond/vdb/trytond_dist/trytond/modules/account/move.py", line 1781, in transition_unreconcile Reconciliation.delete(reconciliations) File "/opt/trytond/vdb/trytond_dist/trytond/modules/account_invoice/account.py", line 286, in delete Invoice.process(invoices) File "/opt/trytond/vdb/trytond_dist/trytond/modules/account_invoice/invoice.py", line 1342, in process cls.post(posted) File "/opt/trytond/vdb/trytond_dist/trytond/model/modelview.py", line 648, in wrapper return func(cls, records, *args, **kwargs) File "/opt/trytond/vdb/trytond_dist/trytond/model/workflow.py", line 34, in wrapper result = func(cls, filtered, *args, **kwargs) File "/opt/trytond/vdb/trytond_dist/trytond/modules/account_invoice_ar/invoice.py", line 774, in post invoices_nowsfe = invoices.copy() AttributeError: 'list' object has no attribute 'copy' Tue Jul 16 14:13:59 2019] INFO:werkzeug:127.0.0.1 - - [16/Jul/2019 14:13:59] "POST /vdb42/ HTTP/1.0" 200 -
Por lo visto, el metodo copy en listas es de python3 y no esta en python2.7
lukio commented
Diferentes formas de copiar una lista:
https://stackoverflow.com/questions/2612802/how-to-clone-or-copy-a-list
lukio commented
Debemos backportear a 4.8, 4.6, 4.4 y 4.2
lukio commented
Interesante artículo al respecto:
http://henry.precheur.org/python/copy_list