When the product is a consumable, avoid to use real-time valuation, by adapting
the onchange in the views and making the valuation field invisible when the
product is a consumable / service.
When extra moves are created, the unit price of the invoice line for these extra moves is now the
same than the unit price of the moves generated from the SO.
opw-634227
Generating an invoice from a delivery now add the taxes to the invoice.
This impacts a returned purchase for which the invoice is created from the delivery, and a sale
order which is set to create invoice on delivery.
opw-634565
The `find` method will get the current accounting periode according to the
user's timezone while time do not. This means that it is possible that users
get a move with a date belongign to a different period that the one returned by
`find`.
Fixing b101808, linked to #4147, courtesy of Graeme Gellatly
The accounting entries generated (during confirmation of moves on real time
products) were based on the move date. This is correct but the creation of the
entries (from quants_move) is done before the change of state of the move
(which set the date of the move to now).
Instead of using the date of move that is changed a few steps laters, use
directly the current date for account move date.
Fixes#4147, opw 619902
Skip the creation of the corrective valuation entry
when a negative quant is reconciled with an incoming
shipment, when:
- the cost has not changed, so the journal entry would
be useless (credit/debit = 0)
- or, when the accounting period for the move causing
the negative quant is already closed, and must not be
updated (presumably the valuation was manually
set before closing that period)
Without this fix, the 'Total' line of the pivot view does not display any inventory value, because there is no __domain as we are not asking the inventory value for any specific product.
This reverts commit 1fd13fbe2b.
For FIFO it was not needed as the cost is already set to the returned quant.
For standard price, this is wrong as the stock is reevaluated when the product
price is changed.
For FIFO and standard price, return product at the purchased price instead of
the cost or current standard price.
Not applied for average as returning a purchased product do not recompute
the average price and would lead to an inconsistency in the stock value.
opw 615263
In the new api an empty recordset converted to string is the name its class
while previously it was converted to an empty string.
The valid v7 condition sould have probably been
move.picking_id and move.picking_id.name or False
but in v8, simply move.picking_id.name is enough and avoids getting these
accounting entries strangly named when there is no picking.
[FIX] super of scheduler should have same params + use_new_cursor should be passed to procure orderpoint confirm
[IMP] Make sure the delivery works when doing phantom boms
[FIX] This should update the average price properly when having multiple moves with the same product
[FIX] Average price should take into account the quantities of all variants
[FIX] Make sure purchase picking type in other company works
[IMP] Views of quants and destination locations of moves
The qty_available available of a product can be negative (e.g. using the force availibility button on delivery order) and the generated account.move.line should be adapted (otherwise getting negative values in debit/credit entries).
Fixes#2475
[IMP] Add purchase order origin on picking
[WIP] Picking type on move for location on routing
[IMP] Provide extra function for custom buttons on picking
[IMP] Action assign optim
[IMP] Push apply should take invoice_state into account. Propagation of cancel of stock moves should depend on procurement rule
stock_account module override the action_done method of stock.move but does not return the same value
This causes problems when calling this function from xmlrpc because the resulting value is now None and that is not allowed to be marshaled by default.
A squashed merge is required as the conversion of the apiculture branch from
bzr to git was not correctly done. The git history contains irrelevant blobs
and commits. This branch brings a lot of changes and fixes, too many to list
exhaustively.
- New orm api, objects are now used instead of ids
- Environements to encapsulates cr uid context while maintaining backward compatibility
- Field compute attribute is a new object oriented way to define function fields
- Shared browse record cache
- New onchange protocol
- Optional copy flag on fields
- Documentation update
- Dead code cleanup
- Lots of fixes
[MERGP] Inline Searchview
This task split the searchview in two parts: SearchView and SearchViewDrawer. The drawer is displayed inside the main view and the searchview stays in place. It also changes the scrolling behavior of the web client: the main view area can scroll without affecting the UI (so the various menus stays in place)
Because of this, other large changes have been made:
the drawer has been redesigned,
the Custom Filter widget has been split in two (Custom Report and SaveCurrentFilter),
the main view is now scrollable, so the UI stays in place and only the view can change
The text 'Group By...' has been changed into 'Group By' (most addons had to be modified)
bootstrap classes are used when it makes sense (for example, badge)
the left menu is also scrollable (separately from the main view)
It is likely that some stupid bugs have been introduced. Please don't hurt me.