-
-
Notifications
You must be signed in to change notification settings - Fork 627
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[17.0][ADD] mail_optional_follower_notification_account: extend mail_optional_follower_notification for invoices #1530
base: 17.0
Are you sure you want to change the base?
Conversation
a2431f6
to
1806ab2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jdidderen-nsi I have tested the changes in the runbot, but I encountered an error when trying to press on send&print button. At first glance, it seems correct as it displays the checkbox to avoid sending to followers, but I couldn't proceed further.
Traceback (most recent call last):
File "/opt/odoo/odoo/http.py", line 1783, in _serve_db
return service_model.retrying(self._serve_ir_http, self.env)
File "/opt/odoo/odoo/service/model.py", line 133, in retrying
result = func()
File "/opt/odoo/odoo/http.py", line 1810, in _serve_ir_http
response = self.dispatcher.dispatch(rule.endpoint, args)
File "/opt/odoo/odoo/http.py", line 2014, in dispatch
result = self.request.registry['ir.http']._dispatch(endpoint)
File "/opt/odoo/odoo/addons/base/models/ir_http.py", line 221, in _dispatch
result = endpoint(**request.params)
File "/opt/odoo/odoo/http.py", line 757, in route_wrapper
result = endpoint(self, *args, **params_ok)
File "/opt/odoo/addons/web/controllers/dataset.py", line 28, in call_button
action = self._call_kw(model, method, args, kwargs)
File "/opt/odoo/addons/web/controllers/dataset.py", line 20, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "/opt/odoo/odoo/api.py", line 468, in call_kw
result = _call_kw_multi(method, model, args, kwargs)
File "/opt/odoo/odoo/api.py", line 453, in _call_kw_multi
result = method(recs, *args, **kwargs)
File "/mnt/data/odoo-addons-dir/mail_optional_follower_notification_account/wizard/account_move_send.py", line 16, in action_send_and_print
return super(
File "/opt/odoo/addons/account/wizard/account_move_send.py", line 794, in action_send_and_print
return self._process_send_and_print(
File "/opt/odoo/addons/account/wizard/account_move_send.py", line 719, in _process_send_and_print
moves_data = {
File "/opt/odoo/addons/account/wizard/account_move_send.py", line 722, in
**self._get_mail_move_values(move, wizard),
File "/mnt/data/odoo-addons-dir/mail_composer_cc_bcc_account/wizards/account_move_send.py", line 92, in _get_mail_move_values
or self._get_default_mail_partner_cc_ids(move, mail_template),
AttributeError: 'account.move.send' object has no attribute '_get_default_mail_partner_cc_ids'
The above server error caused the following client error:
RPC_ERROR: Odoo Server Error
RPC_ERROR
at makeErrorFromResponse (http://oca-social-17-0-pr1530-1806ab2d2941.runboat.odoo-community.org/web/assets/b8f146d/web.assets_web.min.js:2918:163)
at XMLHttpRequest. (http://oca-social-17-0-pr1530-1806ab2d2941.runboat.odoo-community.org/web/assets/b8f146d/web.assets_web.min.js:2922:13)
However, I tried it in the chatter using the invoice template, and it doesn't throw that error. It works as expected, sending only to the added contacts, excluding the followers, and if the checkbox is checked, it also sends it to the followers.
The error doesn't seem to be related to the module, as I tried uninstalling it, and the same error still appears.
If you confirm that this is not a module-related error, I could give a positive review to move it forward. Let me know.
Thanks! Best regards!
…al_follower_notification for invoices
1806ab2
to
8c84910
Compare
@Jaimermaccione I confirm the issue comes from another module and the fix is not yet merged (#1450). To avoid the issue, you can uninstall the module "Email CC and BCC when sending invoice" (mail_composer_cc_bcc_account) on the runbot. |
Since 17.0, Odoo created a separate wizard for sending invoices and the wizard is not related anymore to a composer wizard (odoo/odoo#111857). So I add a new module to restore the behavior from mail_optional_follower_notification in the invoice send wizard.