Does anyone know if it's possible to make adding a shipping method/price mandatory? I want to force anyone making a quote to send to a customer to add a shipping cost (even if it is zero).
Odoo 17 Enterprise on-premise.
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
Does anyone know if it's possible to make adding a shipping method/price mandatory? I want to force anyone making a quote to send to a customer to add a shipping cost (even if it is zero).
Odoo 17 Enterprise on-premise.
Yes, it is absolutely possible to make adding a shipping method (and price) mandatory in Odoo 17 Enterprise (on-premise) — but it will require a small customization, as Odoo doesn't enforce this by default.
from odoo.exceptions import UserError
class SaleOrder(models.Model):
_inherit = 'sale.order'
def action_confirm(self):
for order in self:
if not order.carrier_id:
raise UserError("You must select a Shipping Method before confirming the quotation.")
return super().action_confirm()
Hope it helps
Cree una cuenta para poder utilizar funciones exclusivas e interactuar con la comunidad.
RegistrarsePublicaciones relacionadas | Respuestas | Vistas | Actividad | |
---|---|---|---|---|
|
1
ago 25
|
78 | ||
|
1
jul 25
|
1413 | ||
|
0
abr 25
|
823 | ||
|
0
sept 24
|
1348 | ||
|
0
abr 24
|
1396 |
"Shipping Mandatory" is not a question. A question is a substantial phrase that ends with "?"
We get over 1,000 posts a month and not everyone will open a post to find out what your question is.
I have edited your post to make the title a question.
In the future, please consider using a Question that makes it clear what you ask without requiring people to open your post, as this will often increase the chances
people will respond and make everything clearer for others looking for the same answer.
See also https://www.odoo.com/forum/help-1/meta-why-do-some-questions-get-answers-and-others-do-not-25620