-
-
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 |
sale_framework/__manifest__.py
Outdated
"summary": """Manage blanket order and call of ordr""", | ||
"version": "16.0.1.0.0", | ||
"license": "AGPL-3", | ||
"author": "ACSONE SA/NV,Odoo Community Association (OCA)", |
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.
:O
"author": "ACSONE SA/NV,Odoo Community Association (OCA)", | |
"author": "ACSONE SA/NV,BCIM,Odoo Community Association (OCA)", |
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.