Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
3 Risposte
1556 Visualizzazioni

I try to write on field 'description' with record.write in automated action but i have a raise UserError :

File "/home/odoo/src/odoo/addons/project/models/project.py", line 1771, in write
    handle_history_divergence(self, 'description', vals)
  File "/home/odoo/src/odoo/addons/web_editor/controllers/main.py", line 44, in handle_history_divergence
    incoming_history_ids = incoming_history_matches[1].split(',')
TypeError: 'NoneType' object is not subscriptable

Thanks for you reply

Avatar
Abbandona

Hi Julien i have the same issue, i found that, is related to adding multiple lines on the field, it seems to be an odoo bug, still looking for a solution...

Same issue here on Odoo.sh, affecting multiple users, started this week.. I've raised a support request, awaiting a response.

Risposta migliore

Hi Julien, i have commented this lines in the /addons/project/models/project.py

# if len(self) == 1:
# handle_history_divergence(self, 'description', vals)

And now is working, i think this is not a correct solution, but, in order to continue using the software, it works.

As Siddarth says, the value of incoming_history_matches is None, so, my conclusion is that this error is a bug of odoo relate to the function handle_history_divergence

Regards, 

Avatar
Abbandona
Autore Risposta migliore

I don't have access to this.... and last week all my record work correctly. This error is just on the field description. Then i look the html i see on

  data-last-history-steps an id and if i make an server action this work

Avatar
Abbandona
Risposta migliore

Because you are getting False or None in value of incoming_history_matches.

Try to trace this by printing value of field incoming_history_matches.

Avatar
Abbandona