Commit Graph

131 Commits

Author SHA1 Message Date
Goffin Simon 9e2062a74b [FIX] purchase: _create_invoice_line_from_vals
When creating a SO in dropshipping with 'create invoice' = 'on delivery order',
the resulting invoice must not be linked to the PO but to the SO created.
Inspired from '_create_invoice_line_from_vals' in addons/sale_stock/sale_stock.py

opw:647628
2015-09-11 15:41:33 +02:00
Christophe Simonis ed6d9afecc [FIX] purchase: env['product.pricelist'].price_get expect a partner ID 2015-08-13 12:12:15 +02:00
Nicolas Martinelli 9b1ab76eb2 [IMP] purchase: invoice state of PO line calculated from invoice state of move
Before this fix, a PO line was set as invoiced if all associated invoices were
validated. This is an issue if the invoice_method of a PO is set on 'picking',
and that only a partial quantity is received and invoiced. Indeed, in this case
it was never possible to meet the condition, and the PO could not be set to
'done'.

After this fix, the PO line invoice state is calculated from the invoice state
of the related moves, if the invoice_method of a PO is set on 'picking'. This
is more logical, and moreover this makes possible to set a PO line as invoiced
as soon as all the related moves are done or cancelled.

opw-644399
2015-08-03 09:04:43 +02:00
Martin Trigaux d2e660b31d [FIX] purchase: field label
No need for uppercase, courtesy of Lionel Sausin.

Well, Clarice - have the lambs stopped screaming?
  -- Hannibal Lecter
2015-07-08 13:47:38 +02:00
Nicolas Martinelli ec9702d7ff [FIX] purchase: take into account origin_returned_move_id in case of in_refund invoice
When we return goods and a refund is created, we check the purchase order
linked to the original move. Therefore, the appropriate currency and unit
prices will be chosen.

opw-643085
2015-06-29 11:52:27 +02:00
Nicolas Martinelli 1beb4db6c0 [FIX] purchase, sale_stock: make sure to avoid mixing between in and out invoices
When SO/PO invoices are generated on delivery, there might be a mix between
sale and purchase data on the invoice.

opw-634898
2015-05-27 16:11:31 +02:00
Goffin Simon 75b9932451 [FIX] stock_account: VAT for extra moves
If an extra move contains a product which is not initially in the order,
the taxes set on this product must be considered according to the fiscal position
of this order.

opw:634305
2015-05-27 09:03:18 +02:00
Nicolas Martinelli 769fc81140 [FIX] stock_account: fix dependencies
Purchase and Sale are not part of the dependencies of stock_account, so purchase_line_id
and sale_line_id might not exist.

Fixes #6619
2015-05-13 12:51:18 +02:00
Goffin Simon 79ac324ca1 [FIX] stock_account: Invoicing on incoming shipment
When an extra line is added on an incoming shipment, the resulting
invoice must consider the tax of the product.

opw:630758, 630778
2015-04-01 09:28:48 +02:00
Nicolas Martinelli 34c891a426 [FIX] purchase: set the unit price to zero if requested in the purchase order
If a purchase order is created with free goods (e.g. 5 units offered if 100 are purchased),
the price_unit of stock.move and the cost of stock.quant were set to the product cost price
instead of zero. This would lead to inconsistencies in the 'Current Inventory Valuation'.

opw: 630593
2015-03-27 13:31:03 +01:00
Josse Colpaert 872a80c419 [IMP] Stock: Not only service products can be invoiced after shipment, but also lines without product
Purchase lines or sale order lines without product should have the same behaviour
when invoicing based on shipments as those with services
2015-03-05 18:09:11 +01:00
Josse Colpaert d416492259 [IMP] To determine the invoice we put extra moves in, it is better to take the values from the sale order / purchase order if we can find it through the picking
[IMP] Add comments

[IMP] Simplify code
2015-02-25 10:30:36 +01:00
Josse Colpaert cb6e27c992 [IMP] When invoicing from multiple pickings, services should be checked for all purchases/sales
[FIX] Should make sure purchase order lines are not invoiced twice
2015-02-25 10:29:50 +01:00
Alexandre Fayolle 0e1deed63b [FIX] purchase: typo in commit 675357b + add coverage test
Closes #5193
2015-02-10 14:51:18 +01:00
Adrien Peiffer (ACSONE) 675357b7d7 [FIX] purchase: propagate analytic accounts when invoicing on incoming shipments
Closes #5127
2015-02-09 16:31:19 +01:00
Martin Trigaux 6dceae0de9 [FIX] purchase: access rights when validating a picking
When a warehouse user transfer an incoming shipment, the linked purchase order
is updated as well but the user may not have access to it.
Trigger the workflow as admin instead. opw 619775
2014-12-10 14:45:33 +01:00
Alexis de Lattre 31a01ea772 Fixes #3851 Create invoice from picking copies some parameters from the order to the invoice 2014-12-03 17:53:25 +01:00
Grover Menacho c7b6a96239 [FIX] action_confirm was not asking for purchase pricelist, otherwise it was asking for sale pricelist 2014-12-03 11:28:59 +01:00
Cedric Snauwaert fa561f5caf [FIX] wms: fix lookup of xmlid route_warehouse0_buy
Fixes #2610 courtesy of gurneyalex
2014-09-23 11:05:22 +02:00
Josse Colpaert 066af964bf [IMP] Purchase on incoming shipments with services added 2014-09-17 21:41:42 +02:00
Martin Trigaux 10c3b8c3c8 [FIX] purchase: keep reference to purchase order line
When generating an invoice from a stock.picking, the reference to the purchase.order.line needs to be kept (e.g. this is needed by anglo-saxon for price valuation). (opw 600767)
2014-09-17 16:32:43 +02:00
Josse Colpaert ae2eb43e30 [IMP] Implement comments on pull request 2014-09-12 13:49:42 +02:00
Josse Colpaert d38fafdee8 [IMP] Put wkf_action_cancel back, so the method does not call itself recursively (issue 2079) 2014-09-12 13:49:42 +02:00
Josse Colpaert 1512534320 [FIX] When purchase, do not overwrite price 2014-09-12 13:49:42 +02:00
Josse Colpaert 246c425226 [WIP] Pricelist of purchase is not in stock only and remove product_manufacturer module in view + manufacturer 2014-09-12 13:49:42 +02:00
Josse Colpaert a0d855ffad [IMP] Inter-company pricing: put price on move when only partner and not connected to sale or purchase + invoice_state inverse function 2014-09-12 13:49:41 +02:00
Josse Colpaert 41d36b038c [IMP] Not necessary from merge 2014-09-03 19:18:16 +02:00
Nicolas Seinlet c2b7bca486 - Fix #1253
- avoid using sale objects in stock_account module
- check the purchase side
2014-09-03 19:18:16 +02:00
Josse Colpaert 0aad6b0498 [IMP] Check other comments on pull request: xmlid, no split in context + continue improve receipts instead of receptions 2014-07-16 11:58:22 +02:00
Josse Colpaert bdfdba0de4 [IMP] Update manufacturing 2014-07-07 23:33:47 +02:00
Josse Colpaert af0e9b8aa6 [MERGE] Fix copy_data for merge 2014-07-07 14:33:01 +02:00
Raphael Collet cbe2dbb672 [MERGE] new v8 api by rco
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
2014-07-06 17:05:41 +02:00
Josse Colpaert a3390b0f96 [IMP] Try to solve BoM expansion + check for context for splitting/copying moves 2014-06-27 15:33:07 +02:00
Josse Colpaert ce3645c9d9 [IMP] Corrections on pull request 2014-06-18 16:33:53 +02:00
Josse Colpaert a7866c12bb [FIX] master data should return something 2014-06-17 09:54:46 +02:00
Josse Colpaert eb13d3ee5f [IMP] Make sure there is a link between purchase order invoice and purchase order 2014-06-16 16:04:04 +02:00
Quentin (OpenERP) cba2365d95 [MERGE] branch of jco fixing shipping exception in mrp + cancellation in chained moves
bzr revid: qdp-launchpad@openerp.com-20140425132449-s7e8duh884rirrqz
2014-04-25 15:24:49 +02:00
Quentin (OpenERP) e077a96cdd [REF] purchase: cleaning the TODO messages
bzr revid: qdp-launchpad@openerp.com-20140425091128-13uuwk7txzjoos6z
2014-04-25 11:11:28 +02:00
Josse Colpaert 7a8222631e [IMP] Make sure the propagation of moves cancels procurements where necessary + manufacture and purchase cancel is not propagated by default
bzr revid: jco@openerp.com-20140423141700-60gbuxb4atp1z6ek
2014-04-23 16:17:00 +02:00
Josse Colpaert f119c72f5b [IMP] Help messages for warehouse settings
bzr revid: jco@openerp.com-20140422123326-1fuwmkja041j34yn
2014-04-22 14:33:26 +02:00
Quentin (OpenERP) bde6b6d6e5 [REF] refactoring made during code review. Some optimization patches have been rewritten more clearly, others abandonned or kept. WIP
bzr revid: qdp-launchpad@openerp.com-20140319163359-2ea7tjn5ba1ggein
2014-03-19 17:33:59 +01:00
Josse Colpaert 3bb1e2d64d [IMP] Check purchase order line in reception to invoice
bzr revid: jco@openerp.com-20140224144835-0zvnrjv2dftf6vhg
2014-02-24 15:48:35 +01:00
Josse Colpaert ed978bb905 [IMP] Only check pickings of purchases when state goes to done and optimize query
bzr revid: jco@openerp.com-20140224134126-jmk38b3gxtvbh1ru
2014-02-24 14:41:26 +01:00
Quentin (OpenERP) 17b17b34b9 [MERGE] merged the branch that add the possibility to sum quantities in PO lines for the same product and UoM (when triggering a purchase to solve a procurement) and that contains several fixes on the purchase and purchase_requisition modules (workflow, shipped boolean, procurement resolution...) + a fix on the 'waiting' state of stock moves that was wrongly never set before
bzr revid: qdp-launchpad@openerp.com-20140217231230-6vc9ojo0jxz0yfss
2014-02-18 00:12:30 +01:00
Quentin (OpenERP) 0e0443e2d2 [FIX] purchase: fixed workflow problem in purchase.order (if a PO was having its picking split, then its workflow wasn't listenning to the new move.. which lead to wrong PO state and 'shipped' boolean)
bzr revid: qdp-launchpad@openerp.com-20140217204244-78sui3bdzw2yl2wp
2014-02-17 21:42:44 +01:00
Quentin (OpenERP) 25048c6958 [FIX] purchase: shipped boolean on purchase order should be set to True when the goods are received in 'input' location
bzr revid: qdp-launchpad@openerp.com-20140217170459-ftfqojviyxe9nbl6
2014-02-17 18:04:59 +01:00
Cedric Snauwaert 73183be469 [FIX]when creating location for warehouse, use warehouse code as base name for location instead of warehouse name
bzr revid: csn@openerp.com-20140213094820-v76n4fuqd1omicvy
2014-02-13 10:48:20 +01:00
Quentin (OpenERP) 588507c071 [FIX] stock: reconfiguration of warehouse was buggy when the default resupply warehouse was removed from both the m2o and the m2m, the rules were also wrongly created (not in MTO) and the code was not clean. The renaming of a warehouse is also fixed and the buy/manufacture pull rules are now treated as well
bzr revid: qdp-launchpad@openerp.com-20131105154923-sl8ei71aa123t108
2013-11-05 16:49:23 +01:00
Quentin (OpenERP) 86d58ed2dd [FIX] purchase: the location of the buy pull rule has to be the default_location_dest_id of the in_type_id of the warehouse, and not its input location which can be inactive (if reception is in 1 step)
bzr revid: qdp-launchpad@openerp.com-20131024080325-pkphb3n426gaizmi
2013-10-24 10:03:25 +02:00
Quentin (OpenERP) 52c30fdd38 [FIX] purchase: typo
bzr revid: qdp-launchpad@openerp.com-20131024075054-mq5u06qmhd7oqwa9
2013-10-24 09:50:54 +02:00