Commit Graph
387 Commits
Author SHA1 Message Date
Yannick Tivisse 7978d4ba0f Revert "[IMP] *: Define groups on res.users models"
This reverts commit 99f497b390.
2018-09-10 14:23:42 +02:00
Christophe Simonis 49c3264ce0 [MERGE] forward port branch saas-11.3 up to 4850fb0838 2018-09-07 14:43:48 +02:00
Christophe Simonis f19e6ce561 [MERGE] forward port branch 11.0 up to 213759b03e 2018-09-05 18:52:27 +02:00
Nicolas Martinelli 5b89ca142d [FIX] purchase: vendor reference
In case no PO has a vendor reference, keep the value.
2018-09-03 11:57:49 +02:00
Nicolas Martinelli e6390a76a6 [FIX] purchase: overwrite vendor reference
Overwrite vendor reference only if there is a PO linked to the bill.
Otherwise, any addition of product will erase what the user just typed.

Closes #26734
2018-09-03 09:54:34 +02:00
Nicolas Martinelli 052a5702c5 [FIX] purchase: keep vendor reference
Create a PO and assign any string to the Vendor Reference field. Confirm
and create an invoice.

The Vendor Reference field on the invoice is empty, while it is expected
to be filled in.

opw-1879379
2018-08-30 10:07:35 +02:00
Christophe Simonis ef6b574eda [MERGE] forward port branch saas-11.3 up to 6cc7d3f945 2018-08-21 18:48:13 +02:00
Christophe Simonis 70d0148d0d [MERGE] forward port branch 11.0 up to fbfb91799e 2018-08-21 16:58:17 +02:00
Graeme Gellatly 7d898ad72f [FIX] purchase: rounding in supplier info
- Set 'Product Price' accuracy to 5 places
- Create a PO for a product to a new supplier
- Enter price at 3.14561 / unit

Supplier info entry rounded to 3.15, while it should be 3.14561.

Closes #22253
Fixes #22252
2018-08-16 13:44:23 +02:00
Christophe Simonis dabe59df9c [MERGE] forward port branch saas-11.3 up to 27d8daf8a7 2018-08-14 19:43:32 +02:00
Christophe Simonis 27d8daf8a7 [MERGE] forward port branch 11.0 up to 51225c9b9f 2018-08-14 18:59:57 +02:00
Christophe Simonis 51225c9b9f [MERGE] forward port branch saas-15 up to 52e88036f2 2018-08-14 18:24:40 +02:00
Christophe Simonis 52e88036f2 [MERGE] forward port branch saas-14 up to d4ee30b4fa 2018-08-14 17:45:46 +02:00
Christophe Simonis d4ee30b4fa [MERGE] forward port branch 10.0 up to a487d7d397 2018-08-14 17:09:32 +02:00
Christophe Simonis a487d7d397 [MERGE] forward port branch 9.0 up to 72cb16865c 2018-08-14 16:57:21 +02:00
Martin Trigaux e08f947abe [FIX] purchase: use field in purchase_stock
The field move_dest_ids is now defined in purchase_stock (since the split at
rev 8d4609a1db)

The line was added in purchase at f6b3247c31 in 11.0 but incorrectly forward
ported.

This commit only moves the code to the appropriate module.
2018-08-14 11:16:50 +02:00
Arnold Moyaux e1ff6ce3d9 [FIX] purchase: cancel a PO undo the closest picking cancellation
Usecase to reproduce:
- Set a product buy and MTO
- Create a SO with it and cancel it
- All the pickings are cancel
- Cancel the PO
- The picking that generate the PO is set to confirm
The picking should remain in cancel state

It happens because the button_cancel method still
consider the canceled moves.

This commit only modify destination moves if they still
require an action from the user.
2018-08-13 13:51:54 +02:00
Christophe Simonis 33e7479865 [MERGE] forward port branch saas-11.2 up to d7e2c767ce 2018-08-07 13:59:40 +02:00
Christophe Simonis d7e2c767ce [MERGE] forward port branch 11.0 up to 3513e599a7 2018-08-07 13:58:20 +02:00
Christophe Simonis 427f717d18 [MERGE] forward port branch saas-11.2 up to 932b229941 2018-08-06 13:44:01 +02:00
Nicolas Lempereur 84abc9d06c [FIX] purchase: Receive Products ok context F5
The `active_id` when clicking on "Receive Products" on a purchase order
is the one of the purchase order.

But the action used has a context with:

```
{
    'search_default_picking_type_id': [active_id],
    'default_picking_type_id': active_id,
    'contact_display': 'partner_address',
}
```

So the active_id should be a stock.picking.type and not a purchase
order, thus:

- we could get an error at some instance (eg. a refresh) when loading
  the facet of the stock.picking.type with the ID of a purchase order

- we could erroneously show a facet for a stock.picking.type with the ID
  being the same as the purchase order

So this commit uses the same action without the offending `active_id` in
context.

opw-1870687
closes #26160
2018-08-06 13:18:26 +02:00
Christophe Simonis 932b229941 [MERGE] forward port branch 11.0 up to b29e053436 2018-08-06 11:46:10 +02:00
len-odoo 34d1ecd6f3 [FIX] stock, purchase: clean moves to merge
Purchase creates an activity when some stock move is deleted.
Howver when two moves are merged "behind the scenes", some moves may be deleted.
As a result it creates an activity "warning: some move has been deleted" for no
good reason.
We add a hook to clean moves before the merge.

opw 1826791
2018-08-06 10:17:25 +02:00
Christophe Simonis a9bb3249c6 [MERGE] forward port branch saas-11.2 up to 22b31152ca 2018-08-01 15:17:21 +02:00
Christophe Simonis 22b31152ca [MERGE] forward port branch 11.0 up to f9e0f6663f 2018-08-01 14:20:39 +02:00
Can Tecim bf332e2e08 [FIX] purchase: P3-style super call
3869cdf7d8 merged a fix which used a
P3-style super call, which is not compatible with Python 2.

While 11.0 is not really exactly officially supported on Python 2,
we originally decided not to break compatibility unless there were
very good reasons to do so.
2018-07-31 10:05:30 +02:00
Christophe Simonis ba202dbe63 [MERGE] forward port branch saas-11.2 up to 3c521f6d05 2018-07-24 18:10:32 +02:00
Christophe Simonis 4e76173a43 [MERGE] forward port branch 11.0 up to 219d2296d6 2018-07-23 16:03:25 +02:00
Akim Juillerat 3869cdf7d8 [FIX] purchase: Restore push rules behavior in 2 steps reception
Due to this commit: https://github.com/odoo/odoo/commit/ab5fcb29650349fa641c6130bf6dcbdc1ec28a07
When confirming a PO with two lines having the same product,
the stock moves were not merged anymore in the putaway
(input to stock) picking.

Reason:
When confirming the PO, odoo creates first a receipt
(vendor to input) picking and its stock moves matching the PO line.
Then it applies the push rule on each move. Both putaway
(input to stock) moves are created by copying the receipt
(vendor to input) moves, but when the second is created,
odoo check if there's another move to merge sharing same
properties to merge into it. As purchase_line_id is now copied
in both cases, both putaway moves include a different
purchase_line_id and won't be merged together, since this field
is in _prepare_merge_moves_distinct_fields() on stock.move.

opw:1854387
2018-07-19 15:03:11 +02:00
Goffin Simon 487873f170 [FIX] purchase: Error when updating dropship order
Steps to reproduce the issue:

- change the demo user settings -> use Sales: User: All Documents only
- create a stockable product with dropship feature on and a supplier
- connect as the demo user
- create a sales order with this product
- confirm the order
- as the admin user, confirm the purchase order generated through dropship
- connect as the demo user
- open the confirmed SO
- add a line with this product
- save the SO

Bug:

An access rights error was raised.

opw:1866015
2018-07-19 11:12:09 +02:00
Thibault Delavallée 6f8f66f3ee [FIX] purchase: fix notification layout wrongly reset
Commit e38ed7c780 moved code related to purchase, stock and
purchase_stock in order to clean module dependencies. However probably due to
some wrong manipulation notification layout was reset to an old removed
layout. This commit fixes it.
2018-07-18 11:51:32 +02:00
Christophe Simonis 2214bffefb [MERGE] forward port branch saas-11.2 up to 45329c0cf2 2018-07-05 18:53:17 +02:00
Christophe Simonis 45329c0cf2 [MERGE] forward port branch 11.0 up to 84210074e5 2018-07-05 17:21:01 +02:00
Goffin Simon ab5fcb2965 [FIX]purchase: A duplicated shipment is not associated with the original PO
When duplicating a shipment, the shipment was not linked to the original PO.

opw:1854387
2018-07-04 11:42:41 +02:00
Christophe Simonis c8bb02141d [MERGE] forward port branch saas-11.3 up to 3cdcbce93c 2018-06-28 19:01:52 +02:00
Christophe Simonis 40836194c2 [MERGE] forward port branch saas-11.2 up to 12ddec3a76 2018-06-27 13:41:00 +02:00
Christophe Simonis 12ddec3a76 [MERGE] forward port branch 11.0 up to 152519cd65 2018-06-27 11:37:52 +02:00
Pierre Masereel f6b3247c31 [FIX] purchase: remove move_dest_ids when PO line cancelled
When a PO is confirmed, cancelled, set back to draft and confirmed
again, the push rules don't apply because the PO lines have
move_dest_ids. So we remove those move_dest_ids from PO lines, to allow
push rules to be applied on the newly confirmed PO.

OPW-1859363
2018-06-26 15:02:51 +02:00
Arnold Moyaux d0dc4c60bd [FIX] purchase: dropshipping sequence in multi company
Usecase to reproduce:
- Create 2 sequence for PO(one for each company)
- Create a product with dropshipping
- Connect on the demo user with an active company different than the
admin company
- Create a SO for this product
It will create a PO with the admin's company sequence.

It happens because _run_buy use a sudo since SO user don't always
have the purchase and inventory rights. However the company is not
forced and thus the used company for sequence is the admin company.

opw-1860802
2018-06-26 13:43:08 +02:00
Christophe Simonis bda926034a [MERGE] forward port branch saas-14 up to c9a01ab30a 2018-06-26 13:13:05 +02:00
Christophe Simonis c9a01ab30a [MERGE] forward port branch 10.0 up to 58c92d9374 2018-06-26 12:57:31 +02:00
Josse Colpaert d4582cf020 [FIX] purchase: no mrp fields in purchase please
Fields of mrp should not be put in purchase like this,
as it can throw a traceback e.g. if you generate a purchase
based on a picking in MTO.
2018-06-25 15:38:23 +02:00
Christophe Simonis 152d42041e [MERGE] forward port branch saas-14 up to e4663523b9 2018-06-20 18:48:06 +02:00
Christophe Simonis e4663523b9 [MERGE] forward port branch 10.0 up to 081259ef25 2018-06-20 17:44:58 +02:00
Pierre Masereel 9a810565b0 [FIX] purchase: Canceling the receipt of a receipt
Canceling the delivery order created for a "Make to order" product
cancels the related procurement.

But canceling the receipt order created for a "Buy" product" with reordering rule
didn't cancel the related procurement. In some cases, it can block the application
of the reordering rules.

Now the related procurement is canceled when the receipt order is canceled.

opw:1845345
2018-06-19 15:37:26 +02:00
Nicolas Martinelli 3e2f85e021 [FIX] purchase: duplicate procurement
The fields `purchase_line_id` on a procurement should not be copied.
Otherwise, issue arise in reordering rules.

opw-1859349
2018-06-19 15:24:47 +02:00
Christophe Simonis 73652a0b19 [MERGE] forward port branch saas-11.3 up to 50860317cc
Note: 1aacc96262 has been ignored and will
be forward-ported later
2018-06-15 13:27:27 +02:00
Christophe Simonis 50860317cc [MERGE] forward port branch saas-11.2 up to b170a753e1 2018-06-15 11:30:27 +02:00
Christophe Simonis b170a753e1 [MERGE] forward port branch 11.0 up to b05e4d5f95 2018-06-15 10:15:27 +02:00
Thomas Binsfeld 4d3debe2c3 [FIX] purchase: do not show all pickings from PO if there are no picking
Closes #19961.
2018-06-13 12:05:17 +02:00