Commit Graph
276 Commits
Author SHA1 Message Date
Christophe Simonis f3fa5a5ef7 [MERGE] forward port branch saas-11.3 up to 1e0a92c996 2018-09-13 19:30:33 +02:00
Christophe Simonis 1e0a92c996 [MERGE] forward port branch 11.0 up to 5cb9f8e9d5 2018-09-13 12:42:01 +02:00
Goffin Simon daa6cea439 [FIX] mrp: Upating the quantity of a MO
Steps to reproduce the bug:

- Create three stockable products P1, P2, P3
- Create a BOM for P1 with P2 and P3 as components
- Create a MO with 5 P1
- Check the availability and plan it
- Go on the WO and process only 3 P1
- Go to the MO and update the quantity to 3

Bug:

From this point, it was impossible to pass the MO to the state= 'done'

With this fix, you can now, click on "Post inventory" and the button
"Mark as Done" will appear.

opw:1874227
2018-09-13 10:03:57 +02:00
Christophe Simonis f19e6ce561 [MERGE] forward port branch 11.0 up to 213759b03e 2018-09-05 18:52:27 +02:00
Nicolas Martinelli 2f87bb5169 [IMP] mrp, stock: make _set_quantity_done available in stock
The method is also useful in other modules, so make it available directly
in stock.
2018-08-30 15:23:04 +02:00
Christophe Simonis 70d0148d0d [MERGE] forward port branch 11.0 up to fbfb91799e 2018-08-21 16:58:17 +02:00
Nicolas MartinelliandArnold Moyaux f0028bc837 [FIX] mrp: raw materials and multi-location
- Create a BOM for Product P with the following component:
  Product C, 5.0 units
- Make some stock for C:
  2 units in location 1
  3 units in location 2
- Create a MO for P, reserve.

When trying to produce an error arise:

> Cannot set the done quantity from this stock move, work directly with
> the move lines.

If the user tries to unlock the MO in order to set the done quantity on
the move lines, the same error will arise when trying to produce.

In the specific scope of the production, we set the quantity done on the
move line instead of directly on the move, to avoid this limitation.

opw-1871241

Co-authored-by: Arnold Moyaux <arm@odoo.com>
2018-08-17 13:21:28 +02:00
Pratima Gupta 3935bdc3de [IMP] mrp: update mrp tests to the new 'Produce' wizard
New test :
- Create a MO with a finish product tracked by SN with a dozen as
quantity
- Click on produce button in order to open the produce produce wizard
The quantity to do is 1 dozen although the tracking is by serial number

Task #55494.
2018-06-11 14:46:53 +02:00
Pratima Gupta 2678eba0be [IMP] mrp: produce wizard improvement.
This commit makes several improvement in the 'Produce' wizard on Manufacturing Orders
such as :

1) In produce wizard, all components will be visible. (Regardless of tracking)
2) Quantity done will be equal to expected consumption.
3) Produce wizard line data filled from an onchange on final product
4) Reserved column is added to 'produce' wizard
5) When production order is done, we hide the column 'reserved'
6) In produce wizard, if consuming products are not available or in too small quantity,
the lines is displayed red

Task #55494.
2018-06-11 14:43:03 +02:00
Christophe Simonis f36e6917bd [MERGE] forward port branch saas-11.3 up to 37eed7c509 2018-05-29 17:34:43 +02:00
Benjamin Stiens 6383120f3b [IMP] all: Improve error messages
Many error messages are misleading or too "vague"
This task aims to improve all error message.

Task #47042
PR #23321
2018-05-28 16:45:48 +02:00
Christophe Simonis 5a751fa200 [MERGE] forward port branch saas-11.2 up to aae54ecc15 2018-05-09 15:45:20 +02:00
Christophe Simonis ac63dfc8f4 [MERGE] forward port branch 11.0 up to 8dade01e2c 2018-05-04 16:10:50 +02:00
Pierre Masereel 772ce29193 [FIX] mrp: product unit of measure precision in produce wizard
The precision digit on the produce lines is not set to the product unit
of measure one. That can lead to a lost of precision when a small values
are set in the manufacturing order and not in the produce wizard.

OPW-1838077
2018-05-03 16:48:20 +02:00
Pierre Masereel 4102f38f15 [FIX] mrp: round up quantity to consume in produce wizard
When moves of a MO are generated, they are rounded up to the decimal
precision of the rounding, what is not done in the wizard.

So to keep it consistent, we also round up the quantity to consume in
the wizard.
2018-05-03 16:25:21 +02:00
Christophe Simonis 1f22b81203 [MERGE] forward port branch saas-11.2 up to 7113b70762 2018-04-23 19:36:25 +02:00
Christophe Simonis e8bf128318 [MERGE] forward port branch 11.0 up to 3ab25b60bc 2018-04-23 18:15:25 +02:00
Goffin Simon 32d5a31364 [FIX] mrp: Wrong decimal format in user error
When the produced quantity was a float, it only displayed the integer part.

opw:1837334
2018-04-23 14:06:34 +02:00
Sanjay Jamod 87f6c16dcf [IMP] mrp_bom_cost: Compute price from BoM
Purpose
=======
Compute cost of product(s) based on it's BoM

Specification
=============
real_time: not with FIFO otherwise open the
wizard with the bom price as default new value

periodic: directly set the cost on the form view

Add a server action in order to directly set the price
on selected product.
When getting price from a bom with a sub-bom it will take the
cost of the sub bom except if the sub-bom is set with the bom
itself in the server action (in this case the sub bom cost will
be used).

Capacity is not used for this functionality

task-39561
2018-04-09 15:39:19 +02:00
Christophe Simonis 0f57bdba72 [MERGE] forward port branch saas-11.2 up to 42659dc70c 2018-03-09 16:25:58 +01:00
Martin Trigaux 56c173af9f [IMP] misc: rephrase
Courtesy of e2f translators
2018-02-27 14:58:29 +01:00
XavierDo 2966d4faed [IMP] product: rename product.uom into uom.uom
Also rename product.uom.categ into uom.category to
 give it a decent name.
2018-02-26 14:27:26 +01:00
XavierDo 6a378e3839 [IMP] product: move uom in a new addon
Moves UoM models, test and data to a new addon in
order to be able to use uom without product.
A simple example is be to be able to use UoM for
timesheets.

This commit only move code, and adapt xml ids
without chaging any feature or functionnal
behavior.
Note: 'product' module now depends on new
'uom' module.
2018-02-26 14:27:26 +01:00
Simon Lejeune 6ef460b6a7 [REF] stock, mrp: remove constraint, add onchanges
We added a constraint in [1] to improve the usability of introducing
tracked move lines in the system. However, this contraint proved to be
too costly (trigger multiple time during the validation process, never
called in batch as it is set on the model at the end of a o2m).

We replaces the constraint by checks on the validating process or by
(non-blocking) onchanges.

With these changes, validating the receipt of 3000 tracked move lines
goes from 17 minutes to around 4.

[1] 482407464a

opw-803887
2018-01-18 14:37:13 +01:00
Christophe Simonis f96a797fe6 [MERGE] forward port branch saas-16 up to b8540eefe3 2017-12-06 11:59:38 +01:00
Christophe Simonis a8d01cbf4e [MERGE] forward port branch saas-15 up to a447da75fd 2017-12-04 20:12:19 +01:00
Josse Colpaert 220bdb3587 [FIX] mrp: qty producing on update qty of mo
When updating the quantity of an MO, the qty we are producing on a work
order should possibly be updated.  When the finished product is tracked
by serial number it should be 1.0 when some quantity is still to be
treated.  (and not 0 as before)

opw-785190
2017-12-04 17:18:16 +01:00
Arnold Moyaux b2f6814160 [FIX] mrp: Update quantity traceback
Usacase to reproduce:
- Plan MO with 2 unit to produce.
- Produce 1 unit
- Update the quantity to 1
-> Traceback

active_move_lot_ids should have been changed to
active_move_line_ids during the forward port to 11.0
from this commit d62b307597
2017-11-23 17:09:58 +01:00
Martin Trigaux e1e3b5a56e [IMP] i18n: better terms and labels
add missing string labels
rephrase the error message
add missing _description
removed forward-ported hr_equipment.pot

was unclear, courtesy of the translators
2017-10-30 10:40:01 +01:00
Christophe Simonis 693f8dc68a [MERGE] forward port branch saas-16 up to 7bfde6e05d 2017-10-25 14:57:24 +02:00
Christophe Simonis 2130478cda [MERGE] forward port branch saas-15 up to 71f6e9c6ab 2017-10-24 14:01:58 +02:00
Josse Colpaert d62b307597 [FIX] mrp: unlink temp stock move lots when updating quantity to done qty
You start with an MO with a quantity of 2 with routing and we
produce just 1.  At least one of the components is tracked by lots.
When we update the MO to a quantity of 1 again, the temporary
stock.move.lots continued to exist which led to processing a the consume
d move of e.g. 1 piece with 2 pieces of the quants processed when
posting inventory.

A test is added in order to avoid this case

opw-767526 and opw-772786
2017-10-23 10:15:47 +02:00
amoyaux 41d91e2c96 [FIX] mrp: update MO qty with by_product fail
Update MO qty compute the quantity already processed
but it includes the by_product moves.

This commit add a filter in order to only consider the
move with the final product.
2017-10-20 16:06:28 +02:00
Josse Colpaert d8ae935e74 [IMP] mrp: traceability of quantity of non-tracked product
When producing a finished product with a lot, also the raw materials
without lot tracking should split the move lines to at least know the
quantities consumed for every lot produced.  This way, the traceability
report will not confuse the user.
2017-10-03 13:57:31 +02:00
Khoi Nguyen 1eeac9f196 [FIX] mrp: Aesthetic change in block view
Apply text-uppercase to block button.
2017-09-30 14:25:43 +02:00
amoyaux 7c501e4bf0 [FIX] mrp: product produce line fail with consumed SN
Use case to reproduce:
- Create a product with a BOM needing one component tracked by SN
- Create a MO for this product with 2 to produce
- Produce 1
- Produce the other -> 2 lines and a wrong lot proposed

This happens when the quantity to consume is equal to 0
or if the qty_done on a move_line is equal to the reserved
quantity.

This commit change the condition after the float_compare in
order to take into account the equal comparison.
2017-09-29 16:55:43 +02:00
Pierre Masereel 915b74e181 [FIX] mrp: do not show completed move lines in produce wizard 2017-09-29 11:30:56 +02:00
Josse Colpaert 3d0d8b89d1 [FIX] mrp: give error when no lot on produce in produce wizard 2017-09-27 18:10:20 +02:00
Josse Colpaert fc680f5a6b [FIX] mrp: always add theoretical qty on produce
Before, in case of non-tracked components, when everything foreseen had
already been consumed, it would not add the theoretical quantity on
producing through the produce wizard.  This makes little sense as the
behaviour of the wizard is not the same anymore for all cases and this
can only confuse the user.
2017-09-27 18:10:20 +02:00
Josse Colpaert a11d4174a2 [IMP] mrp: add a line in the produce wizard
Make it possible to add an extra line in the produce wizard. This was
done for when we consume more than foreseen to be able to still add e.g.
the serial number.
2017-09-27 18:10:20 +02:00
Josse Colpaert 4cb2e626a9 [IMP] mrp: Allow optional bom lines with 0 qty
When processing moves with 0 initial demand,
it will set the initial demand = qty_done.  Also, when updating the quantity of
an MO, don't take into account those with 0 quantity.
2017-09-27 18:10:20 +02:00
Pratima Gupta 55c0221e38 [IMP] stock, mrp{,_repair}: warn when operating on out of stock products
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.
2017-09-26 21:36:10 -07:00
Simon Lejeune 6728fe6aac [FIX] stock, mrp: unique serial numbers warning
Different products can have a same serial number but the code didn't
consider it.
2017-09-25 18:17:52 +02:00
Pierre Masereel 332eb431c5 [FIX] mrp: don't show lines of serial with qty_done set
When you open the produce wizard, see all the move lines for a product
to consume with a serial number, we should only see the ones that have
not been already process.
2017-09-21 10:46:13 +02:00
Pierre Masereel d97b35f37a [FIX] mrp: check that a SN as not already been used
When you are processing a MO or WO, you can set two times the same serial
number for the same product.

To avoid this behavior, we created a onchange on the stock move line to
warn the user when he enter two times the same SN. We also create a
constraint on stock move line to avoid having two times same SN in a
picking.
2017-09-21 10:46:13 +02:00
Simon Lejeune 6aebc80053 [REF] stock, etc: only expose public method, remove indirection
also, remove now useless api.multi and dummy methods here and there
2017-09-15 17:49:37 +02:00
Pierre Masereel f3b34fecad [FIX] mrp: production wizard
The production wizard raised a traceback when you were trying to consume
product tracked by lot without reservation.

To fix this issue and some potential others, we have removed the
move lines from the wizard and create produce lines that are used on
validation to create the move lines.

This also let us show the 'To Consume' quantity of a lot instead of the
reserved quantity which has no sense when there is no reservation.
2017-09-11 14:48:08 +02:00
Pratima Gupta 83f2557d72 [IMP] mrp: restructure the consume_line_ids tree view
Also adds strings that are more appropriate in an MRP context.
2017-08-31 21:22:48 -07:00
amoyaux 4ec6069acc [FIX] mrp: update qty to produce does not remove the qty produced
When updating the quantity to produce on a MO, the quantity done
on finished/consumed moves that were not done was erased.

It happens due to write on stock move that always wanted to
unreserve the move and thus drop the move lines with qty_done.
This issue has been resolve in previous commit

This commit correct some mistakes in wizard methods in order
to correctly update open moves.
2017-08-30 11:34:20 +02:00
Christophe Simonis db0810dc6e [MERGE] forward port branch saas-15 up to 0cfbc7581f 2017-08-23 18:15:56 +02:00