Commit Graph
117156 Commits
Author SHA1 Message Date
Thibault Delavallée de33a4193c [FIX] (website_)payment: display website_published field of acquirers in payment
As this field is defined directly in payment and is displayed on
acquirer form view let us display it in tree view also directly
in payment instead of website payment.

This is a manual forward-port of commit 5f24bf5df7.
2017-07-17 14:43:31 +02:00
Martin Trigaux f0a03da2b2 [I18N] Update translation terms from Transifex
Not sure why it did not fetched
2017-07-17 13:33:29 +02:00
Thibault Delavallée 5f24bf5df7 [FIX] (website_)payment: display website_published field of acquirers in payment
As this field is defined directly in payment and is displayed on
acquirer form view let us display it in tree view also directly
in payment instead of website payment.
2017-07-17 13:28:07 +02:00
Atul Patel 9f649f3e40 [FIX] pad: Use a post instead of a get on the request
The old code used Request(data=)]( https://github.com/odoo-dev/odoo/blob/723b083cf5e51beec166059350466e5504db46c9/addons/pad/py_etherpad/__init__.py#L39)

Which however means it did a POST:

> the HTTP request will be a POST instead of a GET when the data parameter is provided

yet the code currently uses `requests.get`, so [it looks very much like a mistake when converting from urllib to requests](https://github.com/odoo-dev/odoo/commit/01e35141479b8dfc4a390518f89fc52e7cec5396#diff-3303eb022ac36e1ef7258c28f24f6de6).
2017-07-17 13:18:37 +02:00
Goffin Simon fea5057425 [FIX] account: Unlinking payment term
When unlinking payment terms, the ir.property records linked to
the fields "property_payment_term_id" and "property_supplier_payment_term_id"
were not deleted.

opw:749459
2017-07-17 12:56:57 +02:00
Nikunj Ladava 84be2e076a [FIX] sale: Retrieve correctly the default_deposit_product_id in ICP 2017-07-17 12:52:08 +02:00
Dipali Tank 37fac4c548 [IMP] hr_holidays: relabel 'holidays' to 'leaves' as this is the App name 2017-07-17 12:20:48 +02:00
Axay Javiya 2c9ea8700a [FIX] sale: fix Tax included price in sale configuration 2017-07-17 12:20:13 +02:00
Dipali Tank 65d0fddc78 [IMP] base: rename Holidays module category to Leaves as this is the App name 2017-07-17 12:19:52 +02:00
Haresh Shyara 0c97c2c47f [IMP] sale: always update salesperson when changing partner
Updating the partner of an SO imply

 * setting the new partner sales person if set;
 * setting myself as I am the person who updated the SO and is therefore
   in charge of managing it.
2017-07-17 12:15:50 +02:00
Jigar Patel 54d8f4b027 [IMP] project(_issue): avoid stage reset at project change when it is shared among the new project
If the new project of the task or issue has the current record stage
among its own stages do not reset it. It avoids unnecessary changes and
chatter logs.
2017-07-17 12:03:31 +02:00
Martin Trigaux 6a61921ddd [I18N] Update translation terms from Transifex 2017-07-17 11:52:51 +02:00
Martin Trigaux 47859c393c [I18N] export saas-15 source terms
4 new modules that were not exported
Reword unclear error message
2017-07-17 11:02:33 +02:00
Nicolas Martinelli 74e4130f5f [FIX] account: accounting date vs invoice date
The accounting date is an hidden field, which is by default the invoice
date. However, a user can make it available in the interface, and modify
it.

When the accounting date is different from the invoice date, we must
make sure to make the accounting date prevail when it comes to currency
conversion. Otherwise, the account move created will use a currency
exchange rate which is not in line with its date.

opw-751848
2017-07-17 10:28:34 +02:00
Mehul Patel 64df882627 [IMP] account_check_printing: Disable Check payments on Cash journals import
Purpose
=======

When generating `Cash` bank journal on CoA import, it doesn't makes sense to have the `Check` payment method enabled by default

Specification
=============

When system automatically creates journals of bank and cash type when CoA is being installed,
1) type = "Bank"
     - Manual -> Checked
     - Check --> Checked
2) type = "Cash"
     - Manual -> Checked
     - Check --> Unchecked
2017-07-17 10:04:19 +02:00
Nicolas Martinelli 779fc8e4fe [FIX] *: raw_value for id
Since the new views, `record.id.value` contains the formatted value of
the ID, meaning it can contain separators. For example, by default,
`1234 => 1,234`. Since this value is used in the image URL, using
`value` won't work anymore.
2017-07-17 09:48:24 +02:00
Simon Lejeune 9d9d1f1d1b [REL] 10.saas~17 2017-07-14 17:13:36 +02:00
Simon Lejeune 4a4513ceb5 [MERGE] stock: models and views refactoring
See commits for more informations. We consider the model as almost
OK, but were are aware that we are introducing all kinds of new
bugs and we'll do our best to fix them quickly :)
2017-07-14 17:10:40 +02:00
Simon Lejeune ddf2b21bdf [REF] stock: adapt to rename of stock.pack.operation into stock.mode.line 2017-07-14 17:08:22 +02:00
Simon Lejeune 27ab5153d9 [REF] stock: rename stock.pack.operation into stock.mode.line 2017-07-14 17:08:22 +02:00
Goffin Simon 73f1c1c4b4 [FIX] is_cost_method_standard forward port 2017-07-14 17:08:22 +02:00
amoyaux 602b26c668 [REF] sale_mrp: adapt tests to new stock implementation 2017-07-14 17:08:22 +02:00
Simon Lejeune 106c34b8d5 [REF] stock_dropshipping: adapt tests to new stock implementation
lifo_price.yml:
    - change the cost method to fifo, as real price does not exist
      anymore
    - do not check the standard price, as it is not update on the
      product in fifo
    - correct calls to picking
    - end the test by checking the value of the out move
    - note: testing the lifo removal strategy has not effect here (we
      could adapt the test to set lot on receipt and check that the
      right lot was taken, but we didn't to that here)
2017-07-14 17:08:22 +02:00
amoyaux 6337ddd496 [REF] point of sale: adapt to new stock implementation 2017-07-14 17:08:22 +02:00
Pierre Masereel f8e749a04d [REF] sale_mrp: adapt tests to new stock implementation 2017-07-14 17:08:22 +02:00
Pierre Masereel 9254dda8a1 [REF] mrp_repair: adapt to new stock implementation 2017-07-14 17:08:22 +02:00
Pierre Masereel b98e6f2d36 [REF] sale_stock: adapt tests to new stock implementation 2017-07-14 17:08:22 +02:00
Pierre Masereel 1168e73a72 [REF] sale, sale_stock: decrease sale order lines usability
* If the user tries to decrease the quantity of a sale order line below
  the received quantity, we raise a warning telling him to create a
  return first.

* As we do not propagate the decrase to the already created pickings, we
  post a message in the chatter of these pickings informing the pickers
  of the change.
2017-07-14 17:08:22 +02:00
Josse Colpaert 5e5cd08123 [REF] stock_account,etc: FIFO and average costing method
The new implementation of stock moves the cost of products from quants to
moves. So we have implemented the FIFO and average cost method based on
those moves instead of using quants.
 - When average price is choosed, a field average_price is set on the
   product.
 - The tests have been completed with an example of how fifo work with
   negative stock.

As the use of real price method is really rare, because of the rigor
required on traceability for such method, we removed this functionnality.
 - The tests purchase/test/fifo_price.yml have been adapted to use the
   FIFO costing method instead of real price.

The old report stock history doesn't exist anymore, and is replaced by
the move view that contains all the cost information.

The methods `get_price_unit` have been moved from the stock to
stock_account.

The methods `_set_default_price_moves` and
`set_default_price_unit_from_product` have been removed from stock.

Explaination of FIFO and average:
 - In action_done for an out move in average and fifo, the price_unit and
   stock_value are updated.
 - For FIFO, it will use the qty_remaining on the in moves to check from
   which in moves to take the stock values for the out.
 - In case of negative stock in FIFO, it puts also qty_remaining on OUTs.
 - In the case of average, it will take the cumulated value of the last
   move and divide it by the quantity in stock.  

This commit is pretty much a 'work in progress':
 - Edit 'done' moves when the costing method is FIFO doesn't trigger the
   replay the FIFO stack.
 - The landed_costs feature doesn't work.
2017-07-14 17:08:22 +02:00
Pierre Masereel 8248f0e153 [IMP] purchase,stock: edit PO line quantity
This commit adapt purchase to be able to edit purchase line ordered quantity
and propagate it to the related picking after the request for quotation
validation.

These are the supported use case

- When you increase the quantity on a purchase line, an extra move (and
an extra picking if they are all done or canceled) is created with the
difference between old and new value and the push rules are applied on
it.

- When you decrease the quantity of a purchase line, different behaviors
can occurs:
  * If you plan to decrese the ordered quantity under the received
    quantity, you get a user error saying tht you have to make some
    return before.
  * Else the moves not done or cancelled are decreased by starting with
    move having no procurement_id. The decrease is not propagated
    through push or pull rules.
  * If you decreased the quantity under the invoiced quantity, a next
    activity is created to remind you to do a refund.
2017-07-14 17:08:21 +02:00
Josse Colpaert 0a76e158e1 [REF] mrp: adapt to new stock implementation 2017-07-14 17:08:21 +02:00
Simon Lejeune 8308dcd346 [REF] purchase: adapt to new stock implementation 2017-07-14 17:08:21 +02:00
Simon Lejeune fe20747ddc [REF] stock: adapt traceability to new implementation 2017-07-14 17:08:21 +02:00
Pierre Masereel 5fcdb06010 [MOV] stock: move traceability report from mrp_workorder 2017-07-14 17:08:21 +02:00
Josse Colpaert eaca63277e [REM] stock: not imported file
Replaced by models/stock_scrap.py
2017-07-14 17:08:21 +02:00
Simon Lejeune 2ba12efb2c [REF] stock: adapt exising tests to new implementation 2017-07-14 17:08:21 +02:00
Simon Lejeune 10efaa91bc [ADD] stock: bunch of tests 2017-07-14 17:08:21 +02:00
Pierre Masereel 809605bb8f [REF] stock, delivery: adapt packages to new implementation 2017-07-14 17:08:21 +02:00
Simon Lejeune ff91120416 [REF] stock: adapt returns to new implementation 2017-07-14 17:08:21 +02:00
Simon Lejeune 4b8689b86b [REF] stock: return wizard: store picking_id in the wizard
Implement the comment from tde
2017-07-14 17:08:21 +02:00
Josse Colpaert 86f08c091e [REF] stock: adapt scrap to new implementation 2017-07-14 17:08:21 +02:00
Simon Lejeune db1b1ab579 [REF] stock: adapt inventory to new implementation
We removed the code that merge negative quants as they aren't split in
the new model.
2017-07-14 17:08:21 +02:00
Josse Colpaert 5d25900cd8 [REF] stock: views refactoring
We adapted the views to the new stock model, and differenciate two
different views:
 - The first one is more adapted for simple operations, or when no
   suggestion of location, lot, pack is needed. We have a line with
   the initial demand of each product and you can complete the lot
   numer, location, etc in the detailed window of a move.
 - The second one is more adapted for pick and barcode operations, all
   each line is fully detailed with the system reservation, you can see
   the lot, location, etc you must scan in the list view.

You can choose the view you want to use in the picking type settings by
check the box 'Show Operations'
2017-07-14 17:08:21 +02:00
Simon Lejeune 0469d2e712 [REF] stock: new picking, move and pack.operation implementation
The big change is that we have now a many2many between the move and a
one2many between a move and its pack.operation (note: this model is
renamed as stock.move.line in a further commit).

Due to these changes, `action_done` had to be rewritten intierely, as it
depended and stock.pack.operation.lot and stock.move.operation.link,
that are now removed. This method was laregly inspired by the one in the
mrp module, and a further commit will make MRP uses all the core of
stock.

Due to the previous commit that refactored the stock.quant
implementation, the new concept is that the `product_qty` that will
always be in the uom of the quant (`product_qty` is a computed field in
the same style as the one of stock.move).

This commit also implements the logic that a manager is able to edit
done stock.pack.operation.

The stock.move has now a "partially_available" state (it was previously
a flag). The "split_from" field is removed now that we have a many2many
between moves (a sibling move is always a move that was splitted, or
with the backorder_id field).

The done quantity of a stock move is computed across the done quantity
of the move lines. There is an inverse method that allows user to fill
the done quantity directly on a stock move.

The reserve quantity of  stock move is computed accross the
`product_qty` of the linked pack operations.

`do_unreserve` will simply unlink the associated pack operation.
Unlinking a pack operation will unreserve.

`force_assign` will mark the move as available, in order to allow the
user to create pack operations (none are created because nothing was
reserved).

`action_assign` is rewritten and splitted in two parts: if the move has
a parent (mto) or not (mts). In the mto, we'll check the available move
lines and only reserve accordingly. In the mts, we'll reserve directly
on the quants.

`action_cancel` has changd a lot: in case of a delivery, the first step
does not anymore propagate cancellation to following moves and SO. As a
result it does not propagate in the other side in case of MTO or production.
It does not delete them if we delete the related sale order for example. In
order to correct this next activities will be added in the future. Technically
action cancel on move is based on procurment rule, this commit will set
the propagate field to false on the rule if the picking_type is 'pick'
or if we are in one step delivery.

We use this commit to reimplement `action_assign` (wiped by the new
quant implentation). A move is reserved if its move lines exist, so we
introduce a one2many between stock.move and stock.pack.operation (note:
a further commit renamed this model into stock.move.line)

We use this commit to implement `action_done` (wiped by the removal of the
models making the link between stock.move and stock.pack.operations). We
can use the one2many to the pack operations.

blabla manymany au lieu de one2many
blabla mto mts

Remove get_ancestors, as orig_ids will be used instead

validation

when we are creating some packe operation with lot name, the
pack_operation are unlink and a new picking is craeted.

This is caused the function _create_lot_for_picking that unlink pack
operation having no quantity reserved instead of ones having no quantity
done.

To fix this we changed product_qty to qty_done and move the code from
action_done of picking to action_done of move

fixup! [IMP] Merge_moves functionality + many2many procurement and original moves instead of one2many

fixup! [REF] stock: basics of new model and stock.move reservation

edit reserved move line

 This is the 1st commit message:

[REM] stock: stock.pack.operation.lot, stock.move.operation.link

These models will become useless once a one2many will be made between
stock.move and stock.pack.operation.

The `action_done` method on stock move has been wiped, as it depended
completely on the removed models.

Joint work with Josse Colpaert <jco@odoo.com>, amoyaux <arm@odoo.com>
and Pierre Masereel <pim@odoo.com>
2017-07-14 17:08:21 +02:00
Simon Lejeune b3180c8411 [REF] stock: new quant implementation
The main idea of this new implementation is that stock.quant is now a
cache of the quantity per location/lot/pack/owner key. We removed every
identity per record, such as `history_ids` or `inventory_value` so that
we can now avoid the linear creation of stock.quant records and are able
to work with only one record per key.

The algorithms to retrieve the quantity per key are made to work with
multiple records, this way we can implement strategies to workaround
postgres locks if concurrent transactions try to work on the same quant
row.

Quants will not be linked to moves anymore, this is in order to be able
to edit stock moves more easily/freely. We removed the links with this
commit and wipe out the `action_assign` on stock move. This will be
implemented in a followup commit, once the relations between stock.move,
stock.pack.operation and stock.quant are clarified.

This commit seems to have unecessary diff, but it was done in order to
run tests on the new implementation.

We adapt the views by removing the fields not present anymore in the
model. This include the complete removal of the inventory valuation
view, as the implementation of stock valuation will be refactored and
moved on stock.move in a following revision.

We wipe out `action_cancel`, `recalculate_move_state`,
`move_quants_by_lot_v10` and `quants_unreserve`.

* `get_removal_strategy` moved from `stock.move` to `stock.quant`

Stock quant model:
  * qty renamed to quantity
  * history_ids: because the quants are not moved
  * inventory_value: implementation moved to stock.move
  * packaging_type_id: doesn't seem to be used (in filters?)
  * propagated_from_id: because we do not split forced quants
  * reservation_id: because the reservation are not linked to
    the stock.move.line

We remove the `lot_ids` computed field, as it depended on the link
between stock moves and quants and could be replaced by a related
to the move lines once the new relation between stock.move,
stock.pack.operation and stock.quant is clarified in a further commit.
Furthermore, the field was not displayed to the user.
2017-07-14 17:08:21 +02:00
Christophe Simonis fbd6ae3cb3 [FIX] web: correct test
Since 29e4394af9, `read` is called before
action execution.
2017-07-14 16:57:27 +02:00
Nicolas Martinelli 9b56c6d42d [FIX] account_bank_statement_import: decimal type
Ofxparse v0.16 returns decimal type for amounts, making `+=` crash in
case of a float.

opw-752172
2017-07-14 16:40:50 +02:00
Martin Trigaux 19113a461d [FIX] point_of_sale: typo 2017-07-14 16:29:24 +02:00
Martin Trigaux d92685f99e [IMP] point_of_sale: clarify warning message
local storage is quite technical
2017-07-14 16:20:10 +02:00
Martin Trigaux 78c9d2838d [FIX] point_of_sale: correct filter label
Courtesy of Moshe Flam
2017-07-14 16:07:10 +02:00