-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
[16.0][Add] sale_order_blanket_order #3436
base: 16.0
Are you sure you want to change the base?
Conversation
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.
There's also sale_blanket_order
in OCA.
sale_framework/__manifest__.py
Outdated
"website": "https://github.com/OCA/sale-workflow", | ||
"depends": [ | ||
"sale_manual_delivery", | ||
"sale_stock_prebook", |
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.
These dependencies seem too much for a "framework".
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.
It's probably not the best name. I have no other idea as the name “sale_blanket_order” is already in use.
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.
Yeah, but it's not only a question of the name, but to require such dependencies, that I think they should be extension modules: sale_framework_manual_delivery
and sale_framework_stock_prebook
. It also highlights that even using sale.order
as base, it requires you some glue code for making it work. I would include also order
on the name to be more specific. It's true that is not easy to name this. What about sale_order_multi_purpose
?
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.
rename this module to sale_order_blanket_order
as it allows to define the sale order type of an order as a blanket order.
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.
also remove the dependency to stock from this module and make another one for the glue with stock
|
..and even a "vault" module in server-auth I dare to say (désolé ; french only). ---->[] |
In my experience in the past, extending a base model to behave different, requires more code to contain the undesired side effects than to add such features. Anyway, as said, having such heavy dependencies for the base module is too much IMO. |
We analyzed the existing code and the Odoo code in depth with @jbaudoux and given the need to manage invoicing, stock reservation, etc. at the blanket order level, it seemed simpler to us to define new SO types. Otherwise, all the specific flows for price management, invoicing, etc. would have had to be duplicated for new models. I've tried to clearly present the constraints and objectives in the 'readme' files. The module is not a base nor a simple module and may be split into several modules if possible. Work in progress |
I don't get the joke I'm afraid. I don't insist more on the architecture, but a module with a generic name should be generic, not so specific of your project, including what |
f88bfcb
to
9e0515b
Compare
9e0515b
to
c7c5388
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.
Hi @lmignon thanks for the huge work. Just a minor suggestion for naming.
IMHO, order_type is too common to be used here to just distinguish whether a sales order is a normal, blanket or call-off, and note that there's already a module sale_order_type
which specializes in managing various order types.
From a functional user perspective, I think a more specific field name here would give the user a better idea of what it represents, thus less headaches.
9ed8373
to
76554e9
Compare
Thank you the review. @youring I'll think about your comment about the naming even if I don't have a better idea at the moment. Once our functional tests are completed, I'll mark this PR as ready for review. |
76554e9
to
61df468
Compare
61df468
to
a8c9cdf
Compare
a8c9cdf
to
acec66a
Compare
Co-authored-by: Jacques-Etienne Baudoux <[email protected]>
Co-authored-by: Jacques-Etienne Baudoux <[email protected]>
Co-authored-by: Jacques-Etienne Baudoux <[email protected]>
Co-authored-by: Jacques-Etienne Baudoux <[email protected]>
Co-authored-by: Jacques-Etienne Baudoux <[email protected]>
Co-authored-by: Jacques-Etienne Baudoux <[email protected]>
Co-authored-by: Jacques-Etienne Baudoux <[email protected]>
Co-authored-by: Jacques-Etienne Baudoux <[email protected]>
Co-authored-by: Jacques-Etienne Baudoux <[email protected]>
Co-authored-by: Jacques-Etienne Baudoux <[email protected]>
"author": "ACSONE SA/NV,BCIM,Odoo Community Association (OCA)", | ||
"website": "https://github.com/OCA/sale-workflow", | ||
"depends": [ | ||
"sale_manual_delivery", |
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.
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.
@rousseldenis
It worked on my very large database.... (even if it was not fast and should be improved)
1d75625
to
a4bb856
Compare
42184c7
to
6a9d7ad
Compare
6a9d7ad
to
62b6d5e
Compare
requires:
Context
When a company sells the same products to the same customers on a regular basis, it's a common business practice to create a sale framework that defines the terms and conditions of the sales.
If you need a way to define:
and also secure the quantities of the products to be delivered, the sale framework module is the right choice.
This module introduces 2 new kinds of sale orders:
Sale Blanket Order: This is a sale order that defines the terms and conditions of the sales, the payment terms, the delivery terms, and secures the quantities of the products to be delivered. It is used to create sale orders that will be delivered in the future.
Call of order: This is a sale order that is created to consume the quantities of the products secured in the sale blanket order.
Others modules can be used to provide the same kind of features. For example, the module (sale_blanket_order)[https://pypi.org/project/odoo-addon-sale-blanket-order] also defines the concept of sale blanket order. The main difference between the two modules is that the sale framework module extends the sale order model to add the sale blanket order and the call of order. This allows to keep the benefits of all the extensions made on the sale order model by other modules without having to adapt them to the sale blanket order model (discount, invoicing; inventory process, ...).
This module extends the functionality of Sale Order to support Blanket Order and Call of Order.
Blanket Order
A Blanket Order is a standard sales order with the following specific features:
The blanket order serves as the central element triggering stock management and invoicing mechanisms.
Stock Management
Delivered quantities are tracked on the sales order lines as with regular sales orders.
The goods are not delivered upon confirmation of the blanket order, but stock can be reserved for the customer using OCA modules:
Invoicing
Standard invoicing policies apply (e.g., invoice on order or on delivery). Payment terms are configurable per order. Prepayment can be enforced by configuring the invoicing policy at the order level using the OCA module (sale_invoice_policy)[https://pypi.org/project/odoo-addon-sale-invoice-policy/].
Consumption Management
A wizard will be available on the blanket order to initiate a delivery. It allows users to select products and quantities for delivery. This action creates a Call-off Order linked to the blanket order.
Call-off Order
A Call-off Order is a standard sales order with these specific characteristics:
Stock Management
No delivery is generated directly from the call-off order.
It triggers:
Standard Sales Orders
To support existing workflows (e.g., e-commerce), call-off orders can be generated transparently from standard sales orders based on product and availability:
Entire orders may be converted into call-off orders if all products are linked to a blanket order.
Mixed orders split call-off items into a new call-off order, with both confirmed within the available quantities of the blanket order.