Commit Graph
120 Commits
Author SHA1 Message Date
Arnold Moyaux 8c769cb40c [FIX] purchase_stock: _run_buy check supplier qty
Usecase to reproduce:
- Product with routes MTO and BUY
- Add a supplier on a product with a min qty of 5
- Create a SO with a qty of 1

A PO is created with the supplier and a quantity of 1. It should return
an error since there is no suppliers that sell with this quantity.

It happens because _run_buy directly use the suppliers on the product
without check for date and minimal quantity.
This commit replace it by _select_seller that manage every details.
2019-02-14 10:19:21 +00:00
Arnold Moyaux a2a6b099a4 [REF] stock, stock_*: procurement batch by rules's actions
Improve the procurement requests performance. Instead of processing
procurement request one by one, search rules that apply for each of
them and group them by rule's actions.

The main technical change is the record creation order.
E.g. 2 SO lines with pick ship delivery.
-Before this commit:
line1 -> LAUNCH_RULE -> PICK MOVE1 -> MOVE1 CONFIRM -> OUT MOVE1
line2 -> LAUNCH RULE -> PICK MOVE2 -> MOVE2 CONFIRM -> OUT MOVE2
-After this commit:
line1/2 -> LAUNCH RULE -> PICK MOVE1/2 -> MOVE1/2 CONFIRM -> OUT MOVE1/2

Also there is one batch creation by company_id. It implies that values
are group by company_id. Since company_id are passed by previous
procurement or by the rule, it become a required value and it's added to
the procurement arguments (it was already always passed in the values,
no functional modification).

_run_buy is reworked. It receives a bathc of procurements, those
procurements could be merged in the same PO or the same PO lines.
However the PO/PO lines are created (if procurement couldn't be
merged in an existing one) at the end of the method. It implies
that 2 procurements creating a PO and merged inside, would now create
2 distinct PO (same for po lines). _run_buy in order to fix this issue:
- group procurements by PO search domain. If the PO doesn't exist,
create only one.
- Inside the same PO: merge quantities, move_dest_ids for procurements
with the same product and UoM.

Other _run_ methods are just adjusted in order to process batch.

For a pick pack ship scenario, without procurment_jit confirm a SO
containing 500 lines will take 40s instead of 15 minutes.
2019-02-14 10:19:21 +00:00
Pratima Gupta de97a490f1 [IMP] various: improve applications and categories name
Purpose is to ease understanding of applications / categories and their
links with the access rights labelling.

This commit is related to task 1884968 and PR #29176.
2019-01-30 14:03:33 +00:00
Darshil Trivedi c48c3e6155 [IMP] stock, purchase_stock: Stock move description
Display product picking,receipt or delivery description depending
the picking type. The purpose is to display usefull information/note at
the right place at the right moment.

This commit is related to task ID : 1880135

closes odoo/odoo#28175
2019-01-28 10:35:11 +00:00
Christophe Simonis cf52a04979 [MERGE] forward port branch saas-12.1 up to d3b8422c9c
closes odoo/odoo#30614
2019-01-28 13:58:11 +00:00
Martin Trigaux bfe1e20d6b [I18N] export saas-12.1 source terms
To reflect fixes at ec2263080a and cd4080839f

closes odoo/odoo#30253
2019-01-16 10:35:49 +00:00
Martin Trigaux af69902ecc [I18N] export saas-12.1 source terms
closes odoo/odoo#29730
2018-12-24 11:07:31 +00:00
Christophe Simonis f351dd8cab [MERGE] forward port branch 12.0 up to 047e2b28de 2018-12-12 11:38:25 +01:00
Laurent Smet 869f99b704 [FIX] account: Copy invoice reference to the move
The reference is not copied to the invoice move because the invoice needs the move to get the
right number and then, we need the invoice number to compute the reference.

So, this commit is required to copy the reference to the move after the invoice validation.

/!\ DO NOT FORWARD-PORT!
This behavior has been already fixed in 12.1 but with too much refactoring for a stable branch.

closes odoo/odoo#29391
2018-12-10 10:59:34 +00:00
Odoo Translation Bot ec4ee14c89 [I18N] Update translation terms from Transifex 2018-12-09 01:16:26 +01:00
Odoo Translation Bot 1208ac6ce3 [I18N] Update translation terms from Transifex 2018-12-02 01:25:05 +01:00
Christophe Simonis e1f9499d26 [MERGE] forward port branch 12.0 up to 053bb45706 2018-12-05 18:46:15 +01:00
Christophe Simonis d7c5bc02cc [MERGE] forward port branch saas-12.1 up to 8aa8548d8a 2019-01-09 19:59:27 +01:00
Pratima Gupta 9c2a6850d8 [IMP]stock_account: Test case changes.
property_cost_method is removed from product.product and product.template.
And use property_cost_method of product.category everywhare.

In This -
Used property_cost_method of product.category instead of cost_method or property_cost_method of product.template.

This commit is related to task#1866333.
2018-11-30 16:08:17 +05:30
Christophe Simonis ce4cc24621 [MERGE] forward port branch 12.0 up to 82a1e1dcc3 2018-11-29 20:06:16 +01:00
Christophe Simonis 7a0243ec15 [MERGE] forward port branch 12.0 up to b3052b690f 2018-11-23 12:11:32 +01:00
Odoo Translation Bot b60f9bb739 [I18N] Update translation terms from Transifex 2018-11-18 01:28:38 +01:00
Christophe Simonis 6faad524cf [MERGE] forward port branch 12.0 up to bc744a1da4 2018-11-16 19:30:20 +01:00
Arnold Moyaux 4f080a6605 [FIX] mrp, purchase_stock: wrong company on rules
Usecase to reproduce:
- Install a database with demo date and mrp or purchase

The buy/manufacture rules have a wrong company for warehouses
in company 'My company, Chicago'

It happens because the warehouse is not specify in the create
values. In this case it creates the rules and set the user current
company as default.

This commit specify the company during the create call.

closes odoo/odoo#28682
2018-11-14 13:49:24 +00:00
Arnold Moyaux a172166a8b [FIX] purchase_stock: merge po by default
Usecase to reproduce:
- Create a product with a vendor and mto/buy route checked.
- Create 2 SO and confirm them

The system generated 2 RDF instead of a single with 2po lines (same than
v11). It happens because the propagation option of buy rules is
leave empty in v11 and Propagate in v12. It was unintentionally removed
by commit 1e160dffd3

This commit set leave empty as default value for buy rules.

opw-1904165

closes odoo/odoo#28637
2018-11-13 14:22:51 +00:00
Arnaud Baes 55d460b5d5 [REF] stock, sale_stock, purchase_stock: stock.uom_propagate config parameter refactor
Avoid duplicate code and instead use a new private function

closes odoo/odoo#29266
2018-12-19 13:57:16 +00:00
David Arnold b6a34384a4 [IMP] add valuation test 2018-12-03 15:16:32 +00:00
David Arnold 3858fb8498 [IMP] account: non deductible taxes to inventory
Non deductible taxes (ones without an account set), increase the target
account of the product.

In case of a inventory operation, this means the inventory account.

To reflect this stock valuation wise, we need to calculate this incremented
values and rely on it during the inventory move price calculation.

This commit does exactly that.
2018-12-03 15:16:32 +00:00
Christophe Simonis 99d0e1b80e [MERGE] forward port branch 12.0 up to a403155dec 2018-11-12 13:06:48 +01:00
Odoo Translation Bot dcc077afc5 [I18N] Update translation terms from Transifex 2018-11-11 01:26:46 +01:00
Christophe Simonis b106b7ce0b [MERGE] forward port branch 12.0 up to dd70c68426 2018-11-06 16:40:07 +01:00
jem-odoo 3e3d6c3ce0 [REF] purchase_*: change received qty api
The received quantity on Purchase Order line can be compared
to the delivered qty on Sales Order line. It is now time for
both to share the same mecanism (introduced in
3bf8a62e0d).

This commit sets `qty_received` as a computed field, depending
of a method (`qty_received_method` field) to compute it. The
value can be computed based on
 - manual value; for services (all the time), and consummable
 products (when stock is not installed).
 - stock moves; for stockable and consummable products (when
 stock is installed)

This is now easier to extend the way the received quantity
need to be computed (like in sale).

Task #1850689

closes odoo/odoo#27663
2018-10-30 12:43:53 +00:00
Odoo Translation Bot 790bd62f14 [I18N] Update translation terms from Transifex 2018-11-04 01:27:12 +01:00
Christophe Simonis 5e055a2afd [MERGE] forward port branch saas-11.4 up to f6ca72b3ce 2018-11-02 10:52:55 +01:00
Christophe Simonis a299517f83 [MERGE] forward port branch saas-11.3 up to 6136f0c02e 2018-10-29 11:56:32 +01:00
Odoo Translation Bot 29dc21ae4b [I18N] Update translation terms from Transifex 2018-10-28 01:25:21 +02:00
Martin Trigaux d0213a6fec [FIX] stock: correctly translate route name
Translating a variable does not work, the call must be translated

Reexport the source terms to reflect the changes

closes odoo/odoo#28099
2018-10-24 09:38:45 +00:00
Odoo Translation Bot de265ce63e [I18N] Update translation terms from Transifex 2018-10-21 01:25:56 +02:00
Christophe Simonis 9dbb7d199c [MERGE] forward port branch 12.0 up to b81c2bce84 2018-10-22 17:57:08 +02:00
arbaes 9764f04a3c [IMP] stock: backorder created only when needed
Before this commit, when the user chose to not make a backorder, a backorder was created then immediatly canceled.
This behaviour is now changed as in such a case the backorder is simply not created anymore
2018-10-16 09:14:48 +00:00
Nicolas Martinelli 5f0be01323 [FIX] purchase_stock: no destination address
- Create a product sold by Dropshipping
- Create a SO, validate
- Validate the corresponding PO
- On the picking, print the 'Picking Operations' or the 'Delivery Slip'

There is no delivery address printed.

The root cause of the issue is that the field `dest_address_id` of the
PO is empty. This is because `partner_dest_id` is not used anymore since
1e160dffd3.

opw-1892990

closes odoo/odoo#27850
2018-10-16 13:12:41 +00:00
Odoo Translation Bot e774b2cb1c [I18N] Update translation terms from Transifex 2018-10-14 01:23:43 +02:00
Nimesh Jethva fb460f8800 [IMP] stock: hide PO/SO on lot view during create&edit
It's not needed to see the many2many of PO and SO during the create and
edit since the lot could not be already sell or buy during its creation.

Task 1909002

closes odoo/odoo#28817
2018-11-29 06:03:39 +00:00
Odoo Translation Bot 07f6b8ef57 [I18N] Update translation terms from Transifex 2018-11-25 01:26:32 +01:00
Martin Trigaux 57884ccdc8 [I18N] all: convert remaining model: translation entries
It should be model_terms:

Fixes odoo/docker#219

closes odoo/odoo#27664
2018-10-11 09:49:01 +00:00
Gustavo Valverde 1c0e419a2d [FIX] purchase_stock: buy_route xml_id
When creating a warehouse with purchase app installed, it will
traceback since the route_warehouse0_buy is referenced in a wrong
module.

closes odoo/odoo#27523
2018-10-08 07:52:57 +00:00
Odoo Translation Bot b6c8919444 [I18N] Update translation terms from Transifex 2018-10-07 02:27:57 +02:00
Christophe Simonis 43b63a0465 [MERGE] forward port branch saas-11.4 up to 57e387b645 2018-10-01 16:01:54 +02:00
Christophe Simonis 998723b909 [MERGE] forward port branch saas-11.3 up to e980af9df0 2018-10-01 11:27:51 +02:00
Odoo Translation Bot a01c1bf5bf [I18N] Update translation terms from Transifex 2018-09-30 02:25:45 +02:00
Odoo Translation Bot 5a439a85ef [I18N] Update translation terms from Transifex 2018-09-25 15:32:59 +02:00
Odoo Translation Bot 1d79bf0273 [I18N] Update translation terms from Transifex 2018-09-23 02:29:29 +02:00
Martin Trigaux ae1fed50d5 [I18N] export saas-11.5 source terms 2018-09-21 16:32:59 +02:00
Odoo Translation Bot 53908da50c [I18N] Update translation terms from Transifex 2018-09-18 18:08:33 +02:00
Martin trigaux 710f67ad4b [I18N] export saas-11.5 source terms
To match new model_terms syntax
2018-09-18 14:30:04 +02:00