Commit Graph
111571 Commits
Author SHA1 Message Date
Simon Lejeune 91d6957849 [FIX] stock_account: fifo and negative stock
rename `_get_candidates_out_move` to `_get_fifo_candidates_out_move`
and `_get_candidates_move` to `_get_fifo_candidates_in_move` as it's
more explicit that they're only used in FIFO costing.

Fix `_update_future_cumulated_value` to filter only on internal moves
and to remove the value added in the past (self is always an out move to
which we added some value) and rename into
`update_fifo_future_cumulated_value`.

In `action_done`, rename `qty_taken_for_candidate` to
`qty_taken_for_candidate` as it's the qty we take to compensate the
candidate and not a quantity we take on the candidate (in this case,
some old out moves that we could not valuate in time because the stock
was negative). We fix the write on the value and cumulated value to
decrease the qty_taken_for_candidate*move.price_unit, because an out
move has always a negative value and we actually substract the value of
`move` which is always an in move and has always a positive value.

We fix the purchase test where negative out moves were valued positively
and add `test_fifo_negative_1` that tests the sending of goods we do not
have and the receipt encoded afterwards.
2017-08-25 16:10:19 +02:00
Simon Lejeune acce1d115a [FIX] stock_account: do not consider transit moves as out moves
We expose a serie of functions that return domains to find in and out
moves and, as opposed as before, the transit locations who have a
company id set (i.e. the inter warehouse transit) do not impact the
valuation of a company.

We rename the `not_move` argument of `_get_latest_cumulated_value` to
`exclude_move`, which is more explicit.
2017-08-25 16:10:19 +02:00
Simon Lejeune 72ff51f565 [REF] stock: product: _compute_quantities
This method is used to set `qty_available`, `virtual_available`,
`incoming_qty` and `outgoing_qty`.

We change the depends because only looking on stock.move is enough (all
changes on quants are made through stock moves, and we de not support to
edit directly quants anyway).

This method will call `_get_domain_locations` and we make sure that,
when the `company_owned` key is present in the context, we also return
domains to find products that are in a location that belongs to the
current user's company. This is done in order to include transit
location.

Also, remove the comment from tde. As these fields are displayed in
view, only using the context could alter the behavior.
2017-08-25 16:10:19 +02:00
amoyaux 0ec73fa9c5 [FIX] stock_picking_batch: scheduled_date field
Stock picking batch was introduced in saas-17 instead of
master as planned. However I missed one field that has been renamed on
stock picking called scheduled_date inseatd of min_date.

This commit make the inverse change in order to be compatible with saas-17
2017-08-25 15:32:14 +02:00
Kirti Choudhary 04b81d37ac [IMP] .tx: module stock_picking_wave renamed to stock_picking_batch
Adapt tx to module rename hence it's entry in config file
2017-08-25 15:13:51 +02:00
Kirti Choudhary af846c354e [IMP] stock_picking_batch: few improvements,
- model renamed: stock.picking.wave -> stock.picking.batch
- Class renamed: StockPickingWave -> StockPickingBatch
- .xml files: changed XML IDs according to module guidelines, reindented code and removed commented code
2017-08-25 15:12:59 +02:00
Kirti Choudhary dace2241f6 [IMP] stock_picking_wave: rename to stock_picking_batch
Also rename it's files and replace old references with new one
2017-08-25 15:06:51 +02:00
Kirti Choudhary 9f1a77f152 [REF] stock_picking_wave: renamed string picking waves -> batch picking.
This commit only rename every string from picking wave to batch picking.
Model rename will only be pushed on master(saas-18) once the forward port
will be done.
2017-08-25 14:04:59 +02:00
Christophe Simonis bfd8224dd4 [FIX] account: correctly create set from list 2017-08-24 21:33:09 +02:00
amoyaux 9db0bf1331 [FIX] stock: show_details view error on edit button
Show details view should directly relfect the stock move line
related to a move. However the user was not able to update
locations and it still exists a button that allow to edit
the move line. Since the move line is the final object everything
should be directly editable and the button should not exist

This commit update the view in order to be able to edit information
directly on it.
2017-08-24 15:27:50 +02:00
amoyaux d6c7749344 [FIX] mrp: workorder qty update consumed quantities
This commit correct some variables renaming forgot in
the stock refactoring introduced by commit 0a76e158e1

It also add a invisible field for active_move_line_ids in order
to pass them to the create and avoid the error about uom_id.
2017-08-24 15:27:28 +02:00
amoyaux cdd7f09520 [FIX] stock: action_assign groupby failure
The function action assign on stock move try to comprare
moves origin and moves dest in order to guess the available quanity.
However with return it happens that the group by method could return
twice the same key.

The method sorted was not correctly used because it used recordset
comparator instead of their id. Sorted on recordset use set comparaison
(superset, subset,..) as defined in models.py with method __gt__, __lt__,...

This commit change the function used on sort in order to use id but
keep the old way on groupby so that we are able to get back recordset.
2017-08-24 15:26:59 +02:00
amoyaux abc482c3d4 [REF] stock: remove function action_show_picking
It is useless and no more used since refactoring introduced
in saas-17
2017-08-24 15:26:14 +02:00
Christophe Simonis 6587eaaf0f [IMP] test_pylint: do not load default config file
This will avoid useless warning when the file does not exists and
possible false positive errors in case of invalid config in this file.

Also strip output

Cherry-pick of c955c3051c
2017-08-24 14:54:38 +02:00
Christophe Simonis a567b50035 [IMP] test_pylint: check for badly written try/except
Cherry-pick of 0ebe59f5d0
2017-08-24 14:52:49 +02:00
Christophe Simonis 900701213f [IMP] test_pylint: check for python3 incompatibilities
Cherry-pick of 9882f24313
2017-08-24 14:51:06 +02:00
qdp-odoo fff4d41da2 [FIX] account: removed unecessary styling on invoice form view.
This extra styling was limiting the field to few digits whereas there was no reason to do so. Fixes #18996
2017-08-24 14:43:30 +02:00
Pierre Masereel 837789fec2 [FIX] sale_stock: update SO delivered quantity
When a picking is done and the quantity done of a move is update, the
delivered quantity of the linked sale order is not updated because it's
only updated on action_done of a move.

To fix this we override the write function of stock move in the
sale_stock module to update the delivered quantity of the corresponding
sale order line
2017-08-24 11:29:10 +02:00
Pierre Masereel c8f1581060 [FIX] purchase: update received quantity of PO
When a picking is edited in done state, the related purchase order line
received quantity is not updated.

To fix this, we add a depends on the product_uom_qty of its stock moves
which is changed when a move is edited in 'done' state
2017-08-24 11:28:11 +02:00
Simon Lejeune fa62521537 [FIX] stock: stock.move.line's write
Make sure that a move's `product_uom_qty` is equal to its
`quantity_done`, even after writing on a done move line.
2017-08-24 11:28:11 +02:00
Xavier Morel 56704c19d6 [FIX] account: iteration different under ordereddict mutation
Did you know that if you iterate on an OrderedDict in Python 2 and add
to the dict during iteration, the new items will be iterated? No? Me
neither.

And did you know that that does not work in Python 3 likely because
OrderedDict's implementation details changed? Why the fuck would
anyone do that and thus why would we care you ask?

WELL WE FUCKING DO IT TURNS OUT and that breaks
test_partial_reconcile_currencies on Python 3...

Fix it, try to make it more obvious that we're doing weird crap
instead of abusing OrderedDict in ways it was never meant to be used.
2017-08-23 19:00:17 +02:00
Christophe Simonis 877e709871 [MERGE] forward port branch saas-16 up to db0810dc6e 2017-08-23 18:20:46 +02:00
Christophe Simonis db0810dc6e [MERGE] forward port branch saas-15 up to 0cfbc7581f 2017-08-23 18:15:56 +02:00
Christophe Simonis 0cfbc7581f [MERGE] forward port branch saas-14 up to f8bf335aea 2017-08-23 18:14:18 +02:00
Christophe Simonis f8bf335aea [MERGE] forward port branch 10.0 up to 420e433fa3 2017-08-23 18:12:24 +02:00
Christophe Simonis 420e433fa3 Revert "[FIX] website_sale: Avoid compute tax for every company"
This reverts commit 04cddc447b.

Public user can't read taxes (map_tax() only play with ids)
2017-08-23 18:07:38 +02:00
Christophe Simonis 30bd5ac0e9 [MERGE] forward port branch saas-16 up to aec6248bb3 2017-08-23 16:44:58 +02:00
Christophe Simonis 7f2bd08608 [FIX] core: define float_utils.round also in python2 2017-08-23 16:31:57 +02:00
Jérome Maes aec6248bb3 [FIX] sale_timesheet: apply correct discount in revenue computation
The discount is saved as a percentage, not in a decimal value
between 0 and 1.
2017-08-23 15:21:38 +02:00
Jérome Maes a8bb544628 [FIX] sale_timesheet: take care of the UoM for revenue computation 2017-08-23 15:21:37 +02:00
Jérome Maes 3bcea6389a [FIX] sale_timesheet: color invoiced timesheet on task
When the invoice is validated, the related timesheet are
set as invoice, and are not updateable anymore.

In order quantity, create and confirm SO, log 2 timesheet
lines and validate invoice. Your 2 timesheet lines will be
mark as invoiced. The other hour to deliver will not be linked
to the invoice (and their revenue=0), so the futur lines will
be updateable. But for the 2 first, the user will have to create
a new timesheet line, intead of updating an existing one. The
color will tell him which line is invoiced.
2017-08-23 15:21:37 +02:00
Jeremy Kersten a5d05ae783 [FIX] mass_mailing_event_track: remove duplicated string
Text was displayed 2 times
2017-08-23 15:18:11 +02:00
qsm-odoo e0d5a875f0 [FIX] web: make "slow" create of m2o fields work
There were some coding mistakes since some changes introduced by
https://github.com/odoo/odoo/commit/d19671f0d0ff7189055cbe0794afed32f8a387e6
2017-08-23 15:14:37 +02:00
Christophe Matthieu 11af3b7339 [FIX] account: unless query when remove partner in reconciliation widget
When the user remove the partner, the reconciliation widget try to read
information on 'res.users' without any partner id.
Open the match view when change the partner.
Remove max-height which can hide the last proposal.
2017-08-23 14:47:49 +02:00
Christophe Matthieu 0b4f3542b2 [ADD] account: reconciliation widget, add load more button in widget to load more statements 2017-08-23 14:46:07 +02:00
Christophe Matthieu cf03a74c32 [IMP] account: reconciliation widget: add a test for load more button 2017-08-23 14:45:46 +02:00
Cedric Snauwaert 1de418aa7a [ADD] account: reconciliation widget, add load more button in widget to load more statements 2017-08-23 14:45:46 +02:00
Xavier Morel 8361ec8819 [FIX] phantomjs for p3
P2 and P3 subprocess stdout seem to have very odd/different behaviours
in the face of mixing select and buffering.

Use raw/low-level IO (os.read) with select to try and fix that
up. Also read more than one byte at a time since os.read will not
block *if* the fd is readable, it will just get whatever data is
immediately available.
2017-08-23 14:34:50 +02:00
Xavier Morel 1cec339092 [FIX] account: bug which blows up in P3
In P2, list comprehensions "leak" their variables to the surrounding
scope, in this case leading to "stl" from the first listcomp being
visible to the second one leading to code which does not break but
does not seem to make any sense.

/cc @csn-odoo
2017-08-23 14:34:50 +02:00
Xavier Morel 1b3ac016af [FIX] account: P3 invalid comparison
Python 3 removed "universal"
ordering. ``ResCompany.fiscalyear_lock_date`` is not required and thus
needs a fallback in case it's empty lest we try comparing a string and
None or False, which is an error.
2017-08-23 14:34:50 +02:00
Xavier Morel a65dfe2421 [FIX] P3: exception semantics issues 2017-08-23 14:34:50 +02:00
Xavier Morel f315ea4b71 [FIX] resource: P3 rounding issue 2017-08-23 14:34:50 +02:00
Xavier Morel 9d0af3c72c [FIX] web_editor: P3 io error
Views archs (and sub-archs) should be serialized to and deserialized
from unicode, not bytes.
2017-08-23 14:34:50 +02:00
amoyaux 857778fa94 [FIX] stock: move entire pack with multiple quants
There was an error message when trying to move an entire
pack that contains multiple quants saying that every component
in the pack should be in the same location. (it the case with the
bug)

It happens because after action_done only one quant of the package is moved
to the new location and other quant still in the old location. Thus the
check fail. Also the extra move for remaining was not created.

This commit changes the get_remaining_prod_quantities on pack operation
that had a migration error between old/new api. This change returns the
correct remaining quantities and thus the extra move is created and all
quants for the pack are moved to the new location.
2017-08-23 14:24:11 +02:00
Martin Geubelle 65ecd109a5 [FIX] web: reimplement conditions in the "Set Default" dialog
The rev. https://github.com/odoo/odoo/commit/49f0413290821cb123e75b4546873cf98edf1d25 reintroduced
the "Set Default" dialog but forgot the conditions part.

This rev. reintroduces the missing part.
2017-08-23 13:53:18 +02:00
Christophe Simonis 59f8b849fb [MERGE] forward port branch saas-15 up to d5f2a38b50 2017-08-23 11:23:08 +02:00
Nicolas Martinelli 3b232b9eff [FIX] link_tracker: do not track 'tel:' or 'sms:' links
- Create a mass mailing including a 'tel' or 'sms' link, e.g.
  `<a href="tel:555-000-0000">555-000-0000</a>`
- When sent, the link is converted to a tracked linked (`http://...`)

We do not want to convert these links, they should be handled by the
browser directly.

opw-765885
2017-08-23 11:08:19 +02:00
Nicolas Martinelli b3590bc58e [FIX] mrp: change lots in produce
- Create Products A and B, tracked by unique serial number.
- Receive some quantity of B.
- Create a BOM for A which uses 1 unit of B.
- Create a MO for 2 units of A, save and check availability.
- Click on the 'Produce' button.
- Change the suggested lot (choose a new one or create), then click on
  the '+' button.

When the wizard is reloaded, the lot chosen is lost.

We reach an exception in the framework: when clicking on the '+' button,
no `create` is performed on the transient model `mrp.product.produce`,
therefore the values are not saved.

Since this use case is an exception and is likely to lead to errors, we
remove the button.

opw-761044
2017-08-23 10:17:49 +02:00
Nicolas Martinelli fa36e98368 [FIX] website_sale: default "Product Prices" value
The default value should be 'subtotal' in the website settings, since it
is already the case in the sales settings.

opw-766024
2017-08-23 09:56:41 +02:00
Benjamin Willig 00125215f7 [FIX] Allow inheritance to change writeoff lines values
Allow inheritance to change writeoff lines values in function _create_writeoff

opw:766422
2017-08-23 09:45:48 +02:00