Main changes include :
- Separate Repair and Sales/Invoicing functionalities
- Possible binding between a Sale Order and many Repair Orders
- Specific 'repair.line' model is now replaced by a 'stock.move' inheritance
- Added a new 'Repairs' Operation Type to warehouse(s)
Task : 3046560
Enterprise : odoo/enterprise#36088
Upgrade : odoo/upgrade#4391closesodoo/odoo#106911
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
* Do not rely on context, everything should be cleary specified through
parameters
Catch context keys in an unique targeted place to improve code clarity
* Drop strange old API
* do not provide unused partner parameter anymore
* do not provide products, qty as a list of tuple, we only request the
same qty for all products anyway
* Clear methods, add/adapt comments and docstrings
* Reduce potential side-effects of context content.
This implements a warning when the user tries to do any of the
following operations on a product that is not in stock:
- Scrapping
- Unbuilding
- Repairing
The warning displays the current stock of the product in question per
location which can be helpful in case the user selected the wrong
location.
1. Create a new company
2. Create a user with access to this company and with access to repair
3. Connect as the new user
4. Try to create a new repair and the stock.warehouse access error
should appear
opw-769160
When you send a quotation, you have a mail template mentionning the
quotation and its price if there is an invoice method, with the quotaion
in attachment.
When you select an invoice method different than 'No Invoice', all the
parts lines except the 'Remove' ones and the fee lines will be invoiced.
When you print a quotation, the price of parts and fees is shown
only if you have an invoice method (you only have the quantity if you
don't invoice)
The invoice is available through a stat button.
The price of removed parts is set to 0.0 by default as it won't be
invoiced.
- Create a product with price tax included
- Create Repair order
- Add the product in tabs "Operation" or "Invoicing"
The tax is added twice in the total.
opw-709608
When the function map_tax is called on the fiscal position in repair
lines to compute taxes, the partner and product are not passed to the
method which leads to mistakes when the module account_taxcloud tries to
get back the taxes for the specific partner and tic_category of the
product.
To fix the issue, we pass the product and partner that we already have
to the function map_tax.
onchange_operation_type on repair line sets source and destinations locations
when changing the type. However the code does not handle multiple warehouses
in one company. Now the first found warehouse is taken into account and
code does not crash anymore.
Workflow was badly removed, before repair invoice method didn't make the stock
moves.
Corrected the issue and made the moves happen always at the end of reparation,
not when the repair reaches the done state (ambiguously named "Repaired").
A new API is introduced for price computing using pricelists. It is simplier
to use in most use cases, which is computing the product price in a given
pricelist. Old methods return dictionnaries and tuples, which are rarely
used in the code.
This commit contains the core of the new MRP. It contains a whole refactoring
of the MRP application, with improved and new features, written in new API.
Among other here are the main manufacturing workflow improvements :
- Picking type not only for pickings but also for manufacturing orders
- Properties replaced by picking type
- BoM can only be produced with its routing (no other)
- Either produce without routing with only production orders, or produce with
routing
- By default, there is an order in the work orders (serially), but you can
override it to be able to work in parallel
- Time clocking on work orders and block time on work centers with reporting
on OEE, performance, losses, ...
- Real-time adaptation of timings on operations
- Lots/serial numbers can be inputted like in the pickings on manufacturing
orders. It is also possible to input them in the work orders.
- Material availability independent of production order state (possibility to
start production when only part of it is there)
- Work sheets on work orders
- Put messages on work orders to make your workers pay attention to something
- Full traceability link to see for each produced piece of stock, the
consumed pieces, ...
- Separate scrap object (a scrap is not done based on an original move
anymore)
- Separate unbuild system (if you want to unbuild into its original
components)
Thanks to all people that helped during this development, notably but not
limited to Chirag A Dodiya (cod@odoo.com), Gaurav Panchal (gan@odoo.com),
Jignesh Rathod (jir@odoo.com), Mansi Trivedi (mtr@odoo.com), Pariket Trivedi
(ptr@odoo.com).