Hey guys i am on version 18 and i did everything you told me. But when i try to validate my OUT document i receive. This is after i deleted the default template for Email delivery confirmation
RPC_ERROR
Odoo Server Error
Occured on buldent-testing-20328414.dev.odoo.com on model stock.picking and id 16 on 2025-05-21 13:21:46 GMT
Traceback (most recent call last):
File "/home/odoo/src/odoo/odoo/http.py", line 1976, in _transactioning
return service_model.retrying(func, env=self.env)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/odoo/src/odoo/odoo/service/model.py", line 156, in retrying
result = func()
^^^^^^
File "/home/odoo/src/odoo/odoo/http.py", line 1943, in _serve_ir_http
response = self.dispatcher.dispatch(rule.endpoint, args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/odoo/src/odoo/odoo/http.py", line 2191, in dispatch
result = self.request.registry['ir.http']._dispatch(endpoint)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/odoo/src/odoo/odoo/addons/base/models/ir_http.py", line 333, in _dispatch
result = endpoint(**request.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/odoo/src/odoo/odoo/http.py", line 740, in route_wrapper
result = endpoint(self, *args, **params_ok)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/odoo/src/odoo/addons/web/controllers/dataset.py", line 42, in call_button
action = call_kw(request.env[model], method, args, kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/odoo/src/odoo/odoo/api.py", line 533, in call_kw
result = getattr(recs, name)(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/odoo/src/odoo/addons/sale_project_stock/models/stock_picking.py", line 11, in button_validate
res = super().button_validate()
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/odoo/src/odoo/addons/stock/models/stock_picking.py", line 1428, in button_validate
pickings_to_backorder.with_context(cancel_backorder=False)._action_done()
File "/home/odoo/src/user/shipping_backbone_ns/models/stock_picking.py", line 19, in _action_done
action_done = super(StockPicking, self)._action_done()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/odoo/src/odoo/addons/sale_stock/models/stock.py", line 120, in _action_done
res = super()._action_done()
^^^^^^^^^^^^^^^^^^^^^^
File "/home/odoo/src/enterprise/quality_control/models/stock_picking.py", line 86, in _action_done
return super(StockPicking, self)._action_done()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/odoo/src/odoo/addons/mrp_subcontracting/models/stock_picking.py", line 54, in _action_done
res = super(StockPicking, self)._action_done()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/odoo/src/odoo/addons/stock/models/stock_picking.py", line 1263, in _action_done
self._send_confirmation_email()
File "/home/odoo/src/odoo/addons/stock_delivery/models/stock_picking.py", line 100, in _send_confirmation_email
return super(StockPicking, self)._send_confirmation_email()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/odoo/src/odoo/addons/stock_sms/models/stock_picking.py", line 49, in _send_confirmation_email
super(Picking, self)._send_confirmation_email()
File "/home/odoo/src/odoo/addons/stock/models/stock_picking.py", line 1270, in _send_confirmation_email
stock_pick.with_context(force_send=True).message_post_with_source(
File "/home/odoo/src/odoo/addons/mass_mailing/models/mail_thread.py", line 42, in message_post_with_source
return super(MailThread, self.with_context(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/odoo/src/odoo/addons/mail/models/mail_thread.py", line 2562, in message_post_with_source
template, view = self._get_source_from_ref(source_ref)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/odoo/src/odoo/addons/mail/models/mail_thread.py", line 3009, in _get_source_from_ref
raise ValueError(
ValueError: Mailing or posting with a source should not be called with an empty template
The above server error caused the following client error:
RPC_ERROR: Odoo Server Error
RPC_ERROR
at makeErrorFromResponse (https://buldent-testing-20328414.dev.odoo.com/web/assets/380de69/web.assets_web.min.js:3143:163)
at XMLHttpRequest.<anonymous> (https://buldent-testing-20328414.dev.odoo.com/web/assets/380de69/web.assets_web.min.js:3148:13)
that is a very clear explanation.
I wonder why, for a simple action like changing a default template, still in ODOO V15, the user shall go thru such nightmare...
Another approach is (1) Copy the default template. (2) Rename the original so you know it is custom, and make any edits you like. This will be the template that is the default, since it is really still the original, just with changes. (3) Rename the copy with (original) at the end, so you have it in case the one you modify is not suitable for all Use Cases. We recommend taking a copy just so you will always have a working template, but this isn't even necessary for everyone - the default template is a default, and any edits you make will persist during upgrades.