odoo/addons/delivery
Denis Ledoux 4ad329de55 [FIX] delivery: shipping invoice line depending on amount total
The delivery module overrode the method _create_invoice_from_picking
to add the shipping costs according to the invoice and the shipping.

The issue is that the method _create_invoice_from_picking creates an empty
invoice, without any line. The lines are added afterwards, using the method
_create_invoice_line_from_vals, within the method _invoice_create_line.
So, after having called _create_invoice_from_picking, the invoice is indeed
created, but without lines, and therefore without the amount total value.
Adding the shipping costs there will thus prevent the shipping costs
based on the total price of the invoice (e.g. free for an order of 500€)

This rev. overrides the method _invoice_create_line instead, as, after
the call to this method, the invoice will be completely set, with all
its lines, and with a correct amount total. The side effect
is that we need to recompute the taxes a second time, using button_compute.

This is not the cleanest way to solve this issue. Indeed, a cleaner patch
would be to change the method _create_invoice_from_picking so it creates
the invoice along with its invoice lines, using the ORM command
(0, _, values) to creates the lines directly within the invoice creation:
invoice['invoice_line'] = [(0, _, values) for values in invoice_lines_vals].

Nevertheless, this is a bigger change, that will probably require API changes,
and therefore should be done in master.

opw-626226
opw-628517
2015-02-20 12:44:11 +01:00
..
i18n [I18N] Update translations from Launchpad 8.0 branches 2015-01-26 16:36:51 +01:00
security [IMP] Security Rule: removed duplicates due to inheritancies of groups 2011-12-12 19:11:13 +01:00
static/img [IMP] Backport one feature from website: this feature allows to specify a file 2014-01-09 16:45:50 +01:00
test [MERGE] Forward-port of 7.0 bugfixes up to 4d3a5df 2014-06-12 13:49:32 +02:00
views [ADD] Shipping report extension 2014-03-18 13:51:54 +01:00
__init__.py [IMP] Delivery module report implementation in the existing picking report 2014-03-18 13:18:23 +01:00
__openerp__.py [DEL] Cleaning: key 'images' removed from all __openerp__.py 2015-01-06 14:20:38 +01:00
delivery.py [FIX] delivery:avoid a crash when editing a delivery.carrier 2015-02-02 13:29:54 +01:00
delivery_data.xml [IMP]update __openerp__.py in all modules 2012-08-17 16:45:40 +05:30
delivery_demo.xml [MERGE] main trunk 2014-02-03 18:30:00 +01:00
delivery_view.xml [FIX] delivery stock_move form, weight alignment 2014-12-21 21:21:13 +01:00
partner.py [REF] *: change linked to server revision 4907. Removed deprecated 'view_load' attribute + removed duplicated first argument of property fields which is replaced with 'relation' argument in case where it is really needed (relational fields): indeed this first argument was totally useless for property of float type (for example). 2013-06-24 11:05:15 +02:00
partner_view.xml [IMP]Remove type field from the views 2012-08-08 17:49:50 +05:30
sale.py [FIX] delivery: pass missing context 2014-12-17 15:16:05 +01:00
stock.py [FIX] delivery: shipping invoice line depending on amount total 2015-02-20 12:44:11 +01:00