Commit Graph
7 Commits
Author SHA1 Message Date
Debauche Stéphane 42d3a82a80 [IMP] stock_account: remove the wizard which change the `standard_price`
Overwrite the method ``write`` of the model ``product.product``.

When we write on ``standard_price``, if
- the context key ``disable_auto_svl`` is not set
- the ``cost_method`` is not "fifo"
We automatically compute ``stock.valuation.layer``

(before we needed to manually call ``_change_standard_price``)

Task #2031422

closes odoo/odoo#41265

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-12-06 10:58:03 +00:00
Yannick Tivisse 09ed7a3554 [IMP] stock_dropshipping: Adapt tests to work with/without demo data 2019-11-05 16:18:10 +01:00
mcm-odoo d4710d92dd [IMP] account: add payment terms to data
- This commit moves the Payment Term "End of Following Month" from
  demo data to data and adds two new Payment Terms: "21 Days" and
  "30% Now, Balance 60 Days".
  It allows the customer to define less Payment Terms

task-2032586
2019-08-29 11:49:17 +00:00
Simon Lejeune 4c47061326 [REF] stock_dropshipping: adapt to stock valuation layers
The tests of this module showed multiple issues with the anglos axon
accounting entries creation so we fix them by getting the value on the
valuation layer and not directly on the stock moves.

About the changes in
test_crossdock.py
> To change a standard price, we need to open the wizard
test_lifo_price.py
> To change a standard price, we need to open the wizard + read the
  valuation on the layers.
test_stockvaluation.py
> Now that we create a layer in and out for a dropshipped move, the
accounting entries are similar to an in followed by an out, thus we need
to increment the number of generated AML. Not that the balance of the
accounts stay the same.

There's a slight change in fifo_perpetual_anglosaxon_ordered though.
Let's say for a start that this config doesn't make sense. Ordered means
we don't read the value on the stock move to create the accounting
entries but only the standard price. We had to change 8 by 10 in this
test because, before this task, the standard price was updated when
running fifo, even in dropshipped. As the PO line was valued at 8, the
anglos axon in stock out was at 8 because the standard price was changed
to 8 after the delivery.

task-1875873
2019-06-10 20:43:00 +00:00
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
Xavier Morel df695e2d92 [IMP] stock_dropshipping: convert tests to SSF 2017-12-04 13:11:55 +01:00
Ankit Joshi 6a943000e8 [IMP] stock_dropshipping: convert yml tests into python 2017-11-02 14:43:50 +01:00