Commit Graph
68 Commits
Author SHA1 Message Date
Adrien Widart 67e19a5dc7 [FIX] mrp_subcontracting: validate a partial picking
When validating a receipt, if the product is subcontracted and if the
picking is not fully done, it will be impossible to create a backorder

To reproduce the issue:
1. Create two products P_compo, P_finished
    - Both storable
    - Both tracked by lot
    - P_compo must have the route "Resupply Subcontractor on Order"
2. Update P_compo's quantity: 4
3. Create a BoM:
    - Product: P_finished
    - BoM type: Subcontracting
    - Subcontractors: a partner P
    - Components: 1 x P_compo
4. In Inventory, create a planned transfer T:
    - Operation Type: Receipt
    - Receive From: P
    - Operations: 4 x P_finished
5. Mark as Todo
6. Inventory > Delivery Orders, find the delivery of P_compo for P and
process it
7. Back to T, Record Components:
    - Quantity: 3/4
    - Set a Lot for P_finished
8. Validate T, Create Backorder

Error: a User Error is raised "You need to supply a Lot/Serial Number
for product: - P_finished"

Since P_finished is subcontracted, a related MO has been generated. On
step 7, when recording the used components, since all P_finished have
not been produced, a second MO is created for the last P_finished.
However, when validating T, both MOs are selected and validated. This is
an error since the user has not yet recorded the used components for the
last MO. The latter should not be validated.

OPW-2582538

closes odoo/odoo#78496

X-original-commit: 21068076b4a6b134f5f07c4c03de7c4eb37b4688
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
2021-10-18 07:56:30 +00:00
Rémy Voet (ryv) 2306ef1044 [FIX] mrp_subcontracting: fix details move button
The detail move button (`action_show_details`) should also
return record component wizard in case of tracked component
for a strict BoM.

task-2637543

closes odoo/odoo#77358

X-original-commit: 44afac03c560becdaead149bfaa82a3245a54c34
Related: odoo/enterprise#21237
Signed-off-by: Steve Van Essche <svs-odoo@users.noreply.github.com>
Signed-off-by: Rémy Voet <ryv-odoo@users.noreply.github.com>
2021-09-29 08:33:14 +00:00
Arnold Moyaux 55588eba57 [IMP] stock: reserve on return to select delivered lot
Since return moves are linked to their original move, it's easy to
manage reservation in those case. We just don't bypass the reservation
when it comes from a reservation outside our stock in order to manage
the computation on linked moves and reserve pieces that were not yet
return.

Also add a return picking type for 2 reasons:
- Allow to select existing lot.
- Display reserved move line for an incoming picking.

Note that this picking type is just a default configuration and could be
modify by the user without any issue.

closes odoo/odoo#64384

Related: odoo/enterprise#20605
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2021-09-04 11:58:36 +00:00
Rémy Voet (ryv) ff4d25a427 [IMP] mrp_subcontracting: allow flexible consumption
Take in account the bom consumption of subcontracting BoM:
- In flexible and warning we can now record extra component
(even if there isn't tracked component).
- In the warning case, we get a warning issue in during the recording
of component if we consume more than expected
- In case of script consumption, we cannot record component expected
if some are tracked. In this case we can consume more than expected
only if the user is a mrp manager.

Also fix "Set quantities" Button for the subcontracting

task-2486811

closes odoo/odoo#75041

Related: odoo/enterprise#20350
Related: odoo/upgrade#2750
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2021-09-03 10:37:48 +00:00
Rémy Voet (ryv) 36e3c443d2 [FIX] stock,mrp_subcontracting: fix "Set Quantity"
The button "Set Quantity" have a different behavior
(it doesn't take in account tracked product) than
the immediate process which is confusing.
Now both flow share the same code and allow to avoid
the "Set Quantity" for the subcontracting with tracked component.

task-2486811

Part-of: odoo/odoo#75041
2021-09-03 10:37:48 +00:00
Rémy Voet (ryv) 2127ded2b1 [FIX] mrp_subcontracting: avoid byproduct
We cannot have byproduct in case of subcontracting,
raise a Error if we try (like operation). Also remove the
it from the subcontracted form (also clean empty space of it).

task-2486811

Part-of: odoo/odoo#75041
2021-09-03 10:37:47 +00:00
Rémy Voet (ryv) 6aa8b7dd67 [IMP] mrp_subcontracting: improve mrp bom report
- The "BoM Structure & Cost" takes now in account
the subcontracting cost.
The subcontracting cost depends of the best supplier info in product
and subcontractor register in the BoM.
- Also add this subcontracting cost (to the cost field) when we click on
"Compute Price from BoM" in the product view.

task-2486811

Part-of: odoo/odoo#75041
2021-09-03 10:37:46 +00:00
Rémy Voet (ryv) 7d9a9574ce [IMP] mrp_subcontracting: add a operation type for resupply
Add a operation type (`stock.picking.type`) for
the subcontracting resupply in order to distinct
easily the a simple delivery and a resupply to a subcontractor.

task-2486811

Part-of: odoo/odoo#75041
2021-09-03 10:37:46 +00:00
William Henrotin 179bd67970 [IMP] stock,mrp_subcontracting: rearange quants filters
Task : 2555118

Part-of: odoo/odoo#74715
2021-09-02 12:57:33 +00:00
JF Aubert 40eb8e158c [IMP] mrp_subcontracting_dropshipping: Add new route
Added 'Dropship Subcontractor on Order' route to simplify user interaction
and stay tuned with 'Resupply Subcontractor on Order'.

Task: 2444742
Part-of: odoo/odoo#71732
2021-09-02 10:41:45 +00:00
Rémy Voet (ryv) 94cb5b6e8f [IMP] mrp_subcontracting: take produce_delay in account
In subcontracting, there wasn't a way to make
the subcontracting resupply delivery plan before
the subcontracting receipt.

Now the hidden subcontracted MO, take in account
(in his planning) the `produce_delay` (in days) of
the product which is automatically plan the
subcontracting resupply delivery correctly.

task-2486811

closes odoo/odoo#75072

X-original-commit: 829369d3ca0530f1aad0599fbb1598810a928cc3
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
Signed-off-by: Rémy Voet <ryv-odoo@users.noreply.github.com>
2021-08-13 09:42:49 +00:00
Nicolas Lempereur 16f5de3ca5 [FIX] mrp_subcontracting: no operation if subcontracting
When setting a Bill or Material to subcontracting, the "Operations" tab
is hidden. But it still effect eg. BoM Structure & Cost report.

With this changeset, we get an error when we save a subcontracting BoM
that has operations.

opw-2513637

closes odoo/odoo#74441

X-original-commit: 41c7bd1461a5346a030ab194b5f7fafa87a4c45a
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2021-07-29 14:28:12 +00:00
svs-odoo 16be2b0705 [FIX] mrp_subcontracting: record components
Before this commit, for a subcontracted product with reserved available
tracked components, if at least one component is recorded but not all,
the "Record components" button isn't available anymore.

How to reproduce:
  - Create a product and create a subcontracting BOM for this product;
  - Add a tracked component for this product;
  - Add some qty. for the tracked component in the subcontracting loc.;
  - Create a receipt for the subcontracted product (for demand qty. more
    than 1) with the subcontractor as partner and confirm it:
    => The "Record components" button should be visible.
  - Record a part of the demand qty. then click on "Continue", then on
    "Discard":
    => The "Record components" button is now hidden.

It's because the button is hidden if all the MO are done or to close
(they are) and if all the tracked move lines have a SN/LN (they have as
they are reserved).

task-2604728

closes odoo/odoo#73991

X-original-commit: 392bc27c0ef0bc238a7eac98497b293622f0fe1d
Related: odoo/enterprise#19756
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2021-07-19 16:55:55 +00:00
Arnold Moyauxandsimongoffin 2a07d7b8f9 [FIX] mrp_subcontracting, stock: Resupply Subcontractor on Order
Steps to reproduce the bug:

- Let's consider a consumable product P with a subcontracted BOM B
- Let's consider that B is subcontracted by a partner S and B has a storable component C
- C has the route Resupply Subcontractor on Order and has a partner SUP as supplier
- Create a purchase order PO with 1 P to S and confirm PO
- A delivery order DO1 is created with C to S
- Change the ordered quantity on PO and set 2 instead of 1

Bug:

DO1 was canceled and a new delivery order DO2 was created with only 1 C instead of 2

It happens due to merge move, when updating the PO line a new rule is
trigger and create the object in this order:
- Move Sub-Stock(finished) -> Subcontract Order -> Move Stock-Sub(comp)

Then the action_confirm is trigger and will run _merge_move
on object from left to right order. But when the move Sub-Stock is
merged, everything is write in the first move and the new move is
unlink. It result by canceling all the following object (so the new
subcontractor and the Move Stock-Sub). It was not an issue for the
subcontracting since the write of stock.move is overridden in order
to update the order quantity when the move quantity is updated.
However in this case the rule are not triggered in order to create
the moves that ressuply the subcontractor.

In order to avoid this mess, this PR prevent the merge in case of a
subcontracting move.

opw-2419222

closes odoo/odoo#69553

X-original-commit: c6447e724b9df3c25c5a5306fc902dfc5dcd6bb8
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
Co-authored-by: simongoffin <sig@odoo.com>
2021-04-21 15:23:05 +00:00
Rémy Voet (ryv) 974c4398b4 [REF] *mrp*: batch _bom_find
Some usage of `_bom_find` are performance bottleneck (one request by
product). By example, when the mrp is installed, search products
with fields compute by `_compute_quantities` (e.g. 'Negative forecasted
quantity'). it is due to the override of `_compute_quantities`
in mrp which will make (in the worst case) a `_bom_find` for each
product in the DB.
To avoid this situation the `_bom_find` method become batched
which can handle several products in once. The signature of the method
has changed and uniformize in all module.

Example performance Gain:
------------------------
In a DB with 7000 products (type 'product'), 500 locations, 1800 BoM,
9000 Stock moves, etc. Search in the tree view with filter "Negative
forecasted quantity":
Before: 10879 (nb SQL request) 12.67 +- 0.11 sec (Total RPC Time)
After: 159 (nb SQL request) 1.82 +- 0.03 sec (Total RPC Time)

task-2439019
2021-03-30 09:27:05 +00:00
Rémy Voet (ryv) 09ce16861b [FIX] mrp_subcontracting: fix subcontracting + MTO
Issue:
In case of MTO on the component tracked by serial of the subcontracted
MO, if the picking generated by the MTO is complete
before record component on the subcontracted picking, when we
record the component, move lines is duplicated, one for the
reservation (due to the MTO chained move) and a other only with the
quantity done. Then it is painful to register component.

Fixes:
Don't the call of `_set_qty_producing()` when we click on
'Record Component', the user should it self applied the `qty_producing`.

closes odoo/odoo#68151

X-original-commit: e61ae06572db8aa5d1c3ecea754d3be6719eb55b
Signed-off-by: Steve Van Essche <svs-odoo@users.noreply.github.com>
Signed-off-by: Rémy Voet <ryv-odoo@users.noreply.github.com>
2021-03-19 14:34:05 +00:00
yhu-odoo cf8073f3f4 [FIX] mrp_subcontracting: wrong subcontracted productions
Previously, when we find out subcontracted productions of moves, we get
all production_id from the origin moves of the moves. When user use
multple steps manufacturing, moves may also have their move_orig_ids.
In this case, we will consider its production_id as subcontracted
production.
To fix, we filered the moves, consider only move that is_subcontract is
true.

closes odoo/odoo#67101

X-original-commit: 60d799059d60befc976fd0fe5e2c0afec5d3f83b
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
Signed-off-by: Yuchen Huang <yhu-odoo@users.noreply.github.com>
2021-03-02 16:29:24 +00:00
Rémy Voet (ryv) 326ae2a725 [FIX] mrp_subcontracting: fix flow with only tracked finished product
Step to reproduce:
- Create a subcontracting BoM by partner A,
for a tracked product B (by serial or lots)
- Create a incoming transfer coming from A and mark as todo.
- Fill the move with move lines with lot + quantity.
- It is impossible to validate the transfer, "You need to supply lot..."

Also at the creation of the picking a warning popover indicate that
the previous operation (the hidden MO) is set after the transfer.

These issues comes from the refactor of mrp for v14 and the part of
subcontracting wasn't complete obviously.

Fixes done:
- Rewrite the code of the `_action_done` for subcontracting. It is for
the case of tracked finished product without any tracked component,
there wasn't any code to manage that. Now manage it by backorder MO
feature. Fix the main bug
- Set finished_date_planned before the transfer to avoid the alert
popover.
- Avoid to write activity in channel about the hidden MO in case of
cancelling.
- Fix `action_record_components` to manage multiple subcontracting
products with tracked component.
- Remove the `priority` field from the wizard MO (in case of tracked
product. Also the wizard is not really a wizard, just a weird hybrid
MO form)

PR: odoo/odoo#61606
task-2357115

closes odoo/odoo#62109

X-original-commit: 1a34e46eaca14aec981dd0f162e8014c7cb0abea
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
Signed-off-by: Rémy Voet <ryv-odoo@users.noreply.github.com>
2020-11-20 16:07:14 +00:00
Goffin Simon 403c687869 [FIX] mrp_subcontracting: Error Message with partial delivery
Steps to reproduce:

- Create a product P with route 'Resupply subcontractor on an order'
- Let's consider a BOM for P with type 'Subcontracting'
- Create a PO with subcontractor set on that product and process with Qty > 1,
- Validate a receipt with partial Qty and no backorder

Bug:

An error was raised because no production_id was set when trying to create a mrp.product.produce

When function _action_done is called with cancel_backorder = True, the function _action_cancel is called on the new_move
with no backorder and it called the function _action_cancel defined on model stock.move in module mrp_subcontracting
This function called _action_cancel on the mrp.production record MP
And finally this function called action_cancel on model stock.move on all finish_moves and raw_moves of MP

This line unlink MP of finish_moves and raw_moves

move.move_dest_ids.write({'move_orig_ids': [(3, move.id, 0)]})

That's why production_id was not set

PS: In this way, we don't cancel a MO when it is still used by other moves.

opw:2322278

closes odoo/odoo#57346

X-original-commit: e4d22d390c8aa8edf757e36704a9e04b2b89f115
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2020-09-09 10:29:26 +00:00
Rémy Voet (ryv) e7fd2ba5c8 [FIX] mrp_subcontracting: fix flow with tracked component
After the odoo/odoo#52949 , the registering of tracked component,
in case of subcontracting, was broken. Fix and try to mimic
the same flow than before. The produce wizard has been replaced
by a clean MO form to register component and use backorder mechanisme
of MO to manage tracked finished product + tracked component.

task-2278147

closes odoo/odoo#54994

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2020-07-30 12:09:10 +00:00
Arnold Moyaux 556a905166 [REF] mrp: byproduct onchange
Create the byproduct moves at the onchange.

task-2241471
2020-06-15 16:59:41 +02:00
Arnold Moyaux ed7012e8fd [REF] mrp: workorders for enterprise
Removed abstract workorder

Removed the integration of expiry wizard in tablet view since it should
be moved in enterprise in the tablet view implementation (not possible
to set consumed lot on workorders on community anymore)

Refactor _set_quantity_done to use ORM command in order to not return a
dict with vals to_create/to_write

task-2241471
2020-06-15 16:59:41 +02:00
Rémy Voet (ryv) 5011ec520c [REF] mrp: review consumption allowing
Now, by default, a Bill of Material have a flexible
consumption instead of strict consumption. Also
add new consumption choice: a flexible consumption
but with a warning when the bom isn't respected.
Also, now, the strict (a new warning option) consumption
is checked only when we try to mark as done the MO.

task-2241471
2020-06-15 16:59:41 +02:00
William Henrotin 0e2765f5fd [REF] mrp: no more produce wizard
Use a view similar as the pickings one.

task-2241471
2020-06-15 16:59:41 +02:00
Martin Trigaux 6db2a81ea2 [IMP] *: use specific ir.property methods
Do not make direct CRUD to ir.property records, use appropriate
methods for that
2020-05-26 15:50:11 +02:00
Victor Feyens 1977f6618b [IMP] mrp_subcontracting: create stock move lines in batch
X-original-commit: e721dc6c25c52ae18aa74b3ffc4cc366b45b16f5
2020-04-02 13:53:04 +02:00
Adrian Torres 1daf8eb127 [FIX] *: set ondelete policy of required Selection fields
With this commit, Selection fields with `required=True` which are
extended via `selection_add` are given proper ondelete policies to
ensure the cleanup of records containing these extended options during
uninstall of the extending module.

This commit also cleans up leftover uninstall hooks that were being used
to handle the same set of problems prior to the ondelete mechanism being
implemented for Selection fields.

closes odoo/odoo#46325

Related: odoo/enterprise#9117
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2020-03-30 13:42:04 +00:00
Pedro M. Baeza 32c81cc195 [FIX] mrp_subcontracting: Allow subcontractor contacts to be used
**Steps to reproduce:**

* Create a subcontractor.
* Create a BoM of type Subcontracting and assign the subcontractor.
* Create a children contact for the subcontractor.
* Creat a purchase order (or a receipt picking) with the children contact of the subcontractor.
* Confirm the document.

**Current behavior:**

Subcontractor documents are not created.

**Expected result:**

They should be created.

**Cause:**

The BoM search is not including possible parents of the partners.

**Solution:**

With the use of `parent_of` operator in the search, we cover both cases of the children
and the parent as initiators of the subcontracting.

closes odoo/odoo#46670

X-original-commit: 86726aba26f4ba8d7dadb29ed2415baf49fe54c0
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2020-03-02 17:06:25 +00:00
Nicolas Martinelli e5b9f5e63e [FIX] mrp_subcontracting: multi-step receipt
- Activate the multi-step reception
- Create a Subcontracting BOM for product P and supplier S.
- Create a PO for S with P
- Validate the PO
- Validate the input transfer
- Validate the internal transfer

A error is raised because a mandatory field is not set.

The root cause comes from the INT move being flagged as a subcontract
move, while it shouldn't be. Indeed, only the input move should be
flagged as subcontract.

We force the `is_subcontract` value to `False` when a move is copied in
the context of a stock rule.

opw-2193009
opw-2202727

closes odoo/odoo#46115

X-original-commit: 8795e0f3d4301710a089d263395633759eae76b7
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-02-24 13:59:23 +00:00
Arnold Moyaux d39fc89324 [FIX] mrp_subcontracting: lot_id instead of lot_name in receipt
Usecase to reproduce:
- Create a subcontracted product tracked without tracked components
- Create a receipt for this product
- Click on show detail

-> Lot_id are display even if the picking type uses create lot.
The assign serial feature is not working either.

The lot_id instead of lot_name is required in case of tracked
components since it will open the produce wizard and the user
will create lot there. However in the case of non-tracked components,
the wizard will not be used nor lot created. In this case the
classic behavior should be used with lot_name

closes odoo/odoo#43997

Task: 2180191
X-original-commit: 00fe4186935435f46a0db197c68e6df956fe80db
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2020-01-27 12:38:13 +00:00
Arnold Moyaux 87fde093d6 [IMP] mrp_subcontracting: filter on partner and product
Allow to easily find product and partners related to subcontracting

closes odoo/odoo#43046

Task: 2158126
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2020-01-20 08:53:14 +00:00
Arnold Moyaux ea340afafa [FIX] mrp_subcontracting: cancel a PO should cancel delivery
When subcontracting a product via a purchase order and not a simple
receipt. Then the cancelation of the receipt will not only cancel
the receipt of the finished product but not the delivery for the
components.

It happens because button_cancel on purchase order will call
_action_cancel the stock.move linked to purchase order line. It will
not call action_cancel on the stock.picking. However the part
responsible for the cancelation of components delivery is in the
stock.picking action_cancel method.

Move the stock.picking action_cancel logic in the stock.move
_action_cancel method since it's always call for both usecase.

Fixes #42551

closes odoo/odoo#42653

X-original-commit: 841305f271411c3a67af271ac09da9ce0922f100
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2020-01-02 18:11:33 +00:00
Victor Feyens 9215e73fa2 [IMP] * : replace with_context(force_company=c) by with_company(c) 2019-11-18 12:25:05 +00:00
Simon Lejeune 9823170f51 [REF] *: adapt tests to picking button_validate multi 2019-10-25 08:10:40 +00:00
Arnaud Baes 0c6488a95a [REF] stock: Set action_done on pickings private
`action_done`on pickings should be a private method,
and called only trough the picking validation process.

task-1938108

closes odoo/odoo#39174

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-10-23 07:43:01 +00:00
Arnold Moyaux ec5e63cf80 [FIX] mrp_subcontracting: correct type for view registry
When the action is called by a javascript function the view
is not correctly rendered because the tree type does not exist
in the registry but the correct type is list.
2019-10-16 07:58:12 +00:00
Arnaud Baes 1f1727c2e1 [IMP] mrp_subcontracting: Set subcontracting location a child of physical locations.
closes odoo/odoo#33490

Taskid: 1873106
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-10-16 06:09:02 +00:00
Jigar Patel 01f5550ee2 [IMP] stock: Rename default locations labels
TaskID: 1873106
2019-10-16 06:09:02 +00:00
Christophe Simonis d74b451805 [MERGE] forward port branch 13.0 up to f4105eb9c7 2019-10-09 02:08:17 +02:00
Arnold Moyaux 6cdaea7223 [FIX] mrp_subcontracting: Initial demand in a BO
Usecase to reproduce:
- Create a receipt with a quantity of 2
- Receive 1 and create a back order
- Receive 2 in the BO

It will only require the components for 2 units and not 3.

closes odoo/odoo#37305

Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2019-09-24 07:45:31 +00:00
Simon Lejeune d1814891fe [REF] mrp_subcontracting: manage backorder
closes odoo/odoo#37046

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-09-18 07:15:32 +00:00
Arnold Moyaux 167fd934a8 [FIX] mrp_subcontracting: empty BoM if no subcontractor
_bom_subcontract_find return a BoM of typer subcontractor for
any partners if the subcontractor is not set. The real behavior is
to not create a subcontracting order if the partner is not set.
2019-09-18 07:14:53 +00:00
Arnold Moyaux 93c53265ed [FIX] mrp_subcontracting: multi company 2019-09-18 07:14:53 +00:00
Raphael Collet 8546d07d0f [FIX] mrp_subcontracting: cannot order by many2many field 2019-09-12 13:53:12 +00:00
Christophe Simonis 64e43808b7 [MERGE] forward port branch saas-12.5 up to 58a83d1222 2019-09-20 17:34:45 +02:00
Simon Lejeune 9d4a552690 [REF] mrp_subcontracting: multi company
Ensure proper domains are applied and enforced on relation fields thanks
to the `check_company` attributes.

task-1985992
2019-09-03 15:05:03 +00:00
Raphael Collet 9920f20e4c [IMP] models: ORM speedup
This branch is the combination of several optimizations in the ORM:

* store field values once in the cache: the cache reflects more
faithfully the database, only fields that explicitly depend on the
context have an extra indirection in the cache;

* delay recomputations by default: use method `recompute` to explicitly
flush out pending recomputations;

* delay updates in method `write`: updates are stored in a data
structure that can be flushed efficiently to the database with method
`flush` (which also flush out recomputations);

* make method `modified` take advantage of inverse fields to inverse
dependencies;

* filter records by evaluating a domain on records in Python;

* a computed field with `readonly=False` behaves like a normal field
with an onchange method;

* computed fields are computed in superuser mode by default.

Work done by Toufik Ben Jaa, Raphael Collet, Denis Ledoux and Fabien
Pinckaers.

closes odoo/odoo#35659

Signed-off-by: Denis Ledoux <beledouxdenis@users.noreply.github.com>
2019-08-20 12:43:59 +00:00
Arnold Moyaux 4055293873 [IMP] mrp_subcontracting: bypass reservation
A subcontracting receipt should be always assigned even
if the components are not deliver. It depends on the partner
and not our company.
2019-08-19 15:03:59 +00:00
Arnold Moyaux 5d809fd6b4 [MOV] purchase_mrp_subcontracting -> mrp_subcontracting_account 2019-08-19 15:03:59 +00:00
Arnold Moyaux a684372fdd [IMP] mrp_subcontracting: subcontractors required
Force to set subcontractors on subcontracting BoM since
it's always used in order to determine if a subcontracting
should be apply on a receipt or not. Also there is not magical
behavior has 'if there is no subcontractor on the BoM then it
means all partners...'
2019-08-19 15:03:59 +00:00