Commit Graph

49 Commits

Author SHA1 Message Date
David Monjoie f1ed73e5ea [FIX] stock_account: default on lst_price instead of list_price
The list_price field doesn't take the extra price of variations
into account. Actually, it's not even a field of product.product.
The lst_price, however, is defined on both product.template and
product.product and does account for the extra price of variations.

OPW 659330
2015-12-15 12:29:02 +01:00
Goffin Simon 47e7f5d9bd [FIX] stock_account, sale_stock: _get_partner_to_invoice
When getting the partner to invoice, the function _get_partner_to_invoice
must check the type of the invoice to create.

opw:658460
2015-12-11 13:13:48 +01:00
Goffin Simon 28463d0310 [FIX] delivery, stock_account: invoice on delivery with fiscal position
When creating an invoice on delivery, the right 'account_id' was not
set on the invoice line according to the fiscal position.

opw:657542
2015-11-30 09:46:38 +01:00
Nicolas Martinelli 8827789ff2 [FIX] stock_account: remove traceback introduced by f2108e9
invoice_vals['name'] may not be defined yet.
2015-08-13 12:46:22 +02:00
Nicolas Martinelli f2108e9edd [FIX] stock_account: merge the Reference/Description
When invoices are created from pickings, and that the user chooses to group by
partner, we make sure to keep the Reference/Description of all the source
documents. This is exactly what is done for the Source Document field.

opw-646903
2015-08-10 11:54:28 +02:00
Denis Ledoux 279f225cf0 [IMP] mrp, stock, stock_account: compute stored fields trigger
This is a performance revision.

Some stored functions field were recomputed uselessly.

In mrp, `hour_total` and `cycle_total` were recomputed
at each write on `mrp.production`, while they should be recomputed
only when there is a change on the `workcenter_lines` field,
or when there is a change in the `hour` or `cycle` field
of these `workcenter_lines`.

In stock, `min_date`, `max_date` and `priority` of
`stock.picking` were recomputed each time a new move
was added to the picking,
wether or not the 'expected_date' of this move
was between the `stock.picking` `min_date` and `max_date`,
and the priority not greater.

In stock, `product_qty` of `stock.move` was recomputed
at each write on the `stock.move`, while it should be
recomputed only when there is a change in `product_id`,
`product_uom` or `product_uom_qty`, as the computation
method only depends on these three fields.

In stock_account, the `invoice_state` of `stock.picking`
was recomputed each time a new `stock.move` was associated
to the picking, wether or not the `invoice_state` of the move
was already the same than the `invoice_state` of the picking.

opw-643560
2015-06-30 13:12:37 +02:00
Goffin Simon 663e7bb531 [FIX] stock_account: refund
Invoices of type refund should be considered.
2015-06-11 13:16:45 +02:00
Goffin Simon fb57514cf0 [FIX]account_anglo_saxon: price unit of a move
The price unit of a move must be computed with the product_uom of
this move.

opw:640454
2015-06-09 09:30:54 +02:00
Goffin Simon 1da3a8b353 [FIX] stock_account: description for extra moves
The extra moves must take into account the field description_sale or description_purchase and
the field default_code set on the product.

opw:640387
2015-05-28 13:59:11 +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
Nicolas Martinelli 8ab987d828 [FIX] stock_account: set the same unit price for extra moves than for moves linked to SO
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
2015-05-11 12:23:19 +02:00
Nicolas Martinelli 61a5bbfb21 [FIX] stock_account: add taxes to invoice when creating an invoice from delivery
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
2015-05-11 08:26:14 +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
Martin Trigaux e6d869b493 [FIX] stock_account: inconsistency in invoice line origin
The origin of the invoice lines was the same as the invoice (both using variable 'origin').
2015-02-03 17:11:38 +01:00
Denis Ledoux 3335e79652 [FIX] stock_acount: an invoice origin can be False
Therefore:
 - we avoid to split an a bool, as this isn't possible
 - we avoid to concatenate False with strings
2015-01-07 15:10:29 +01:00
Denis Ledoux 31468888a1 [FIX] stock_account: avoid duplicate document origin in invoice
This fix is related to 8de7be6219

opw-621962
2015-01-07 15:00:23 +01:00
Xavier ALT 8de7be6219 [FIX] stock_account: keep all picking origins when creating a grouped invoice 2014-12-24 15:23:36 +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
kevin cf51c506f7 [FIX] stock: inverse function field should write the given value and not current 2014-10-21 17:24:42 +02:00
Josse Colpaert 383f2b2c43 [IMP] Make sure invoice_state of picking is used when creating extra moves and take price of related move if there is one
When we would copy, it gives problems as it won't be invoiced the correct way on sale, so we provide for a simpler solution.
2014-10-06 09:10:09 +02:00
Josse Colpaert 636294e1ef [IMP] Scheduled time, weights, remove routing on lines 2014-09-17 21:41:41 +02:00
Josse Colpaert ae2eb43e30 [IMP] Implement comments on pull request 2014-09-12 13:49:42 +02:00
Josse Colpaert cd462b7c8d [IMP] Invoice_state on move and search custom picking type 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 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 064b1a3a40 [IMP] Old hack where uom_id had to be empty in on_change
[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
2014-09-12 13:49:41 +02:00
Josse Colpaert aa8dc9c2e9 [IMP] After invoice onshipping it should show all the created invoices 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
Nicolas Seinlet 2bd1ec9e6b remove pudb 2014-09-03 19:18:15 +02:00
Nicolas Seinlet a0670b5b99 fix #1253 2014-09-03 19:18:15 +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 eb13d3ee5f [IMP] Make sure there is a link between purchase order invoice and purchase order 2014-06-16 16:04:04 +02:00
Josse Colpaert 8e223c8aba [IMP] Invoice_state based on delivery wizard recheck + returns and invoice_state 2014-06-13 17:44:03 +02:00
Quentin (OpenERP) f2ff555432 [REF] stock_account: introduced _get_invoice_vals() to ease inheritance of this feature
bzr revid: qdp-launchpad@openerp.com-20140508102505-f4bwpgixezwhkq6h
2014-05-08 12:25:05 +02:00
Quentin (OpenERP) 3fcc60c689 [REF] removed duplicated _ before method name
bzr revid: qdp-launchpad@openerp.com-20140507162054-l31zu5608w7xvfu0
2014-05-07 18:20:54 +02:00
Quentin (OpenERP) 8b24726b33 [REF] stock_account: removal of TODO statements
bzr revid: qdp-launchpad@openerp.com-20140425143936-yiyg7y1km29978ox
2014-04-25 16:39:36 +02:00
Quentin (OpenERP) 5afa7d8aaf [REF] stock, stock_account: invoice_state field of push rule moved into the right module
bzr revid: qdp-launchpad@openerp.com-20140422124113-scgaooce0ofjawpk
2014-04-22 14:41:13 +02:00
Josse Colpaert d207edc369 [IMP] Move sale_stock_workflow towards sale_workflow and make sure project_mrp tests pass
bzr revid: jco@openerp.com-20130910154822-u2if98d4r32rtibi
2013-09-10 17:48:22 +02:00
Quentin (OpenERP) 15dd2573d5 [FIX] better split of onshipping invoice (some code needed to be moved in sale_stock\!) + misc fixes in delivery (yaml test fixed as well)
bzr revid: qdp-launchpad@openerp.com-20130909142350-axvodv298wnmm7ox
2013-09-09 16:23:50 +02:00
Josse Colpaert 616ea85583 [IMP] user_id is in sale
bzr revid: jco@openerp.com-20130909122028-k34a2yo7yry44xst
2013-09-09 14:20:28 +02:00
Quentin (OpenERP) 6c9490d11c [FIX] stock: invoice on delivery can be done on picking that aren't linked to a sale order/procurement. It fixes a bug in anlgo saxon yml test also
bzr revid: qdp-launchpad@openerp.com-20130909091056-40uvicvymia2yui2
2013-09-09 11:10:56 +02:00
Pooja Zankhariya (OpenERP) 4899e29bd2 [IMP]Improved Code
bzr revid: pza@tinyerp.com-20130906101728-wr9oi2wv54jhgzux
2013-09-06 15:47:28 +05:30
Josse Colpaert 4e805a6a5a [FIX] _defaults instead of defaults (psi)
bzr revid: jco@openerp.com-20130902073012-p9s5tws5kvisgodi
2013-09-02 09:30:12 +02:00
Josse Colpaert 20e762dd24 [IMP] Invoice_state in procurement order defaults
bzr revid: jco@openerp.com-20130830152256-npdkrlefn3lxurwn
2013-08-30 17:22:56 +02:00
Josse Colpaert b38138d555 [IMP] Invoice_state on procurement order should be defined in stock_account
bzr revid: jco@openerp.com-20130830151201-6xwnaxymdynaja7h
2013-08-30 17:12:01 +02:00
Josse Colpaert 1a1338fa41 [IMP] Add invoice_state on move in stock_account and make sure it gets passed through procurement on the move
bzr revid: jco@openerp.com-20130830081648-mmfxshzl9cuk3jg6
2013-08-30 10:16:48 +02:00
Josse Colpaert 5ca2f661a6 [ADD] As stock.py moved, we need to add it
bzr revid: jco@openerp.com-20130829073427-mdx76slvnkr939gq
2013-08-29 09:34:27 +02:00