Daily updates from Odoo
Thursday, August 26, 2021
3 changes · master
Resolved issues and error corrections
A typo in the signing feature’s background request was corrected. This helps prevent a small technical error from interrupting parts of the document signing flow.
Code cleanup and technical improvements
The Documents spreadsheet screens were migrated to Odoo's newer action framework, helping keep the interface maintainable and aligned with current platform standards. Existing spreadsheet links remain compatible while a clearer spreadsheet identifier is introduced to reduce confusion.
Original PR description
This commit converts the spreadsheet and template client actions
to new wowl actions.
Note: there are two "service-like" classes introduced in this commit.
They act as an interface between the actions and the server to hide
model specificities ("documents.document" vs "spreadsheet.template")
There are not actually registered as services since they are used only once.
Better naming ideas for those classes are welcome.
TODO (in the future)
- convert helpers to use the new orm service
- remove action inheritance (abstract spreadsheet action).
There are better ways to achieve the same thing without inheritance
which might not be straight forward to read and a bit fragile.
Task 2621549
Co-authored-by: fleodoo <fle@odoo.com>Miscellaneous changes
odoo treats 'x_studio_partner_id' field as many2one when calling _message_add_suggested_recipient. there are geting id from partner passed by this method. But we are not restrict there to create x_studio_partner_id field as many2one only. if there may different ttype of the field with same name, as this method is passsing that field's value to add in recipients, there is traceback in backend. Here is tracback: ... Traceback (most recent call last): File "/home/hpr/odoo/community/od
Original PR description
odoo treats 'x_studio_partner_id' field as many2one when calling _message_add_suggested_recipient. there are geting id from partner passed by this method. But we are not restrict there to create…
odoo treats 'x_studio_partner_id' field as many2one when calling
_message_add_suggested_recipient. there are geting id from partner
passed by this method. But we are not restrict there to create
x_studio_partner_id field as many2one only.
if there may different ttype of the field with same name, as
this method is passsing that field's value to add in recipients,
there is traceback in backend.
Here is tracback:
...
Traceback (most recent call last):
File "/home/hpr/odoo/community/odoo/addons/base/models/ir_http.py", line 237, in _dispatch
result = request.dispatch()
File "/home/hpr/odoo/community/odoo/http.py", line 684, in dispatch
result = self._call_function(**self.params)
File "/home/hpr/odoo/community/odoo/http.py", line 360, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/home/hpr/odoo/community/odoo/service/model.py", line 94, in wrapper
return f(dbname, *args, **kwargs)
File "/home/hpr/odoo/community/odoo/http.py", line 348, in checked_call
result = self.endpoint(*a, **kw)
File "/home/hpr/odoo/community/odoo/http.py", line 913, in __call__
return self.method(*args, **kw)
File "/home/hpr/odoo/community/odoo/http.py", line 532, in response_wrap
response = f(*args, **kw)
File "/home/hpr/odoo/community/addons/mail/controllers/main.py", line 296, in message_get_suggested_recipients
return records._message_get_suggested_recipients()
File "/home/hpr/odoo/enterprise/web_studio/models/mail_thread.py", line 19, in _message_get_suggested_recipients
obj._message_add_suggested_recipient(result, partner=obj.x_studio_partner_id, reason=self._fields['x_studio_partner_id'].string)
File "/home/hpr/odoo/community/addons/mail/models/mail_thread.py", line 1498, in _message_add_suggested_recipient
if partner and partner in self.message_partner_ids: # recipient already in the followers -> skip
File "/home/hpr/odoo/community/odoo/models.py", line 5547, in __contains__
raise TypeError("Mixing apples and oranges: %s in %s" % (item, self))
Exception
...
Forward-Port-Of: odoo/enterprise#20187