Community mailing list archives
RE: Sale and purchase workflowby
I think you can put it on the official module for that code,
As my experience from version 6.0, there’s many Odoo change that not look on previous version.
Because of that change there’s some feature that remove and Odoo doesn’t replace it without the same kind of feature.
For Nhomar case for example:
Before we have delivered field status in sale order,
And you remove it without replace the same kind of feature.
Right now you notice it, but you said its improvement (in our point of view: it is not, it must be there because in the previous version we already have that).
Please see the point of view of customer, if we said we(as integrator) need to make a development for the feature that they already have on previous version but not have in newest version, and they need to pay it.
They will not like it, and will have trauma to move to newest version.
Please consider your old customer, before making the change.
As I have heard about your talk that you put more priority in your old client rather find the new one,
but your decision doesn’t reflect that.
Expert in Finance, Information System & Business Intelligence
Odoo Silver Partner
Tel. 13670137019 (China - Shenzhen)
From: Fabien Pinckaers [mailto:email@example.com]
Sent: Wednesday, September 16, 2015 5:54 PM
To: Community <firstname.lastname@example.org>
Subject: Re: Sale and purchase workflow
The delivered status is per purchase order line, not anymore per order (e.g. partial reception). You get it from the "Purchase Order" menu, not from the "Request for Quotation" menu.
Having said that, a global status could be a good improvement. (if all lines are received, set the shipment button green). But it's just a 5 lines of code improvement, something like:
received = fields.Boolean(compute='_get_received')
self.received = not self.order_lines.filtered(lambda x: x.product_qty > x.qty_received)
This gives you an idea on how simple it is when we don't use a workflow to sync the data.
On Wed, Sep 16, 2015 at 9:30 AM, Nhomar Hernández <email@example.com> wrote:
Sucks sucks sucks....
As simple as:
Click on confirm purchase + Go Shipping + Validate Purchase order is not marked as received.....
F..... it is unbeleivable, if the partner problem was long this will be "The endless history"......
2015-09-16 0:47 GMT-05:00 Fabien Pinckaers <firstname.lastname@example.org>:
A lot of people are asking more information about the changes in sale and purchase apps in Odoo 9, mostly the removal of the workflow.
In short, we did a huge cleanup of the sale.* and purchase.* modules while porting them to the new API. The result in 5000 lines of code removed, for more features supported, and no feature removed.
The v8 sale module had a lot of issues:
- not possible to modify a sale order (open orders)
- no way to handle inter-company invoicing based on delivery/receptions (only one of the two invoices was generated)
- not possible to invoice kits based on deliveries
- too many different ways to incoice customers: based on sale order, based on sale order lines, based on support contracts, based on regular contracts, based on expenses, based on delivery orders, final invoice on timesheets, ...
- those different invoice methods could not be mixed in a single sale order (sell physical products with a support contract on timesheets)
- some of these invoicing methods were very complex to configure: to invoice on timesheet, you had to: 1/ create a SO, 2/ create a contract, 3/ set a product on the employee form, 4/ set the analytic_user_function to know to role of the user, 5/ invoice from the contract...
- contracts (based on analytic accounts) are a pain. They are complex to understand (support contracts vs regular contracts) and to manage on a regular basis. (e.g. How do you make a quotation for a new support contract?)
Complete rewrite the sale and purchase modules. We cleaned all the legacy code while porting everything to the new API. The net result is 5000 lines of python code removed. Less lines of code for more features is a good sign of something that is technically clean.
*What are the main changes?*
In addition to the quantity ordered field on sale order lines, you have three new fields: Qty Delivered, Qty Invoiced, Qty to Invoice. Qty delivered can be set manually (milestones of a project you invoice manually) or computed based on timesheets or delivery orders. The two others fields are always computed.
The product has a new field "Invoice Method": based on quantities ordered, based on quantities delivered (could be timesheets), based on time and material (reinvoice costs or expenses).
So, whatever the products/services, you always generate invoices based on sales order. All other methods disappeared, you can do everything from the sale order.
The meaning of "Done" in sales order in different. In v8, done means "delivered and invoiced". In v9, done means "you can not change the order anymore". Delivered and Invoiced are written on SO lines, not in the status.
We removed the workflow because it was a mess. For example, in version 8, the "state" field was used for the SO state (quotation --> sale order) as well as the invoice state and delivery state (done=delivered and invoiced). We splitted this in several computed fields:
- State: Quotation --> Sent --> Sale Order
- Invoice State: Nothing to Invoice, To Invoice, Fully Invoiced, Upselling Opportunity
- Delivered: quantities are set on SO lines
More over, as the user can edit the SO at any step, workflows were not useful anymore. It's also much faster now.
*What are the improvements?*
Compared to v8, all complex use cases work perfectly in v9:
- single point of invoicing: sale order --> super easy
- you can mix any kind of services and invoice everything at once from the sale order: pre-paid support contract, project invoiced on milestones, physical products, extra travel and expenses, etc.
- the system manages upselling opportunities (when delivered quantities > ordered quantities). Example: you sell a support contract of 25h, when you arrive at 30h on timesheets, the sale order switch to "Upselling Opportunity"
- inter-company rules with invoice for both the supplier and the customer, based on delivered quantities
- invoice kits, based on delivered quantities
- handle correctly unit of measures: sell a support contract by "Pack 40h", work by hours in your timesheets
- modify a confirmed SO: it will handle delivery and invoicing correctly
change prices on a confirmed SO: some lines are readonly or not based on what have already been invoiced
- more efficient management of deposits
- 3 ways to track services: manually (set milestones as done), timesheet on contract (the v8 method), timesheets on tasks
- correctly handle the right product when a user do timesheet (defined by the SO line): you can work as a senior developer or on a support contract --> no need for analytic_user_function anymore
What about purchases?
We also reviewed purchase orders with a similar concept (Qty delivered, Qty invoiced) In v8, you had three methods to generate draft invoices: based on PO, based on PO lines, based on receptions. It's much easier in version 9, there are 0 methods :)
We don't pre-generate draft invoices anymore, but you can select POs when you create a vendor bill: it will fill all invoice lines automatically based on what can be invoiced (received products or services).
No more problem of merge, partial invoices, control of quantities if received in several steps, ...
It's very difficult to explain such a huge change in just a small email.
So I hope this small email helps,
You can get more information in the documentation, some docs have been updated to the new process (check the sale tab): https://docs.google.com/spreadsheets/d/12Xg70FiWQH0LJXsRWVNDO1TwQbhPvV4UFm2UdAAHPrQ/edit#gid=576547174
Post to: mailto:email@example.com