openerp-community team mailing list archive
-
openerp-community team
-
Mailing list archive
-
Message #01232
Re: additional_discount for 6.1
Dear Christophe,
I had a look at your module "additional_discount" for OpenERP 6.1, and I
was surprised to see that, when you have an "additionnal discount" on an
invoice, it doesn't impact the account move that is generated when you
validate the invoice. You should warn users about this and state clearly
that this module is not suitable for companies that use OpenERP as their
accounting system.
I also noticed that the discount is not copied from sale order to
invoice when the invoice is based on deliveries (same when the invoice
of the PO is generated from the deliveries).
P.S. : in the code of sale.py, instead of inheriting _make_invoice(),
you should inherit _prepare_invoice() because it provides better
performances :
- when you inherit _make_invoice(), the generation of the invoice from
the sale order will do both a create() and a write(), which makes 2 SQL
operations
- when you inherit _prepare_invoice(), it will only do a create(), so
only 1 SQL operation (_prepare_invoice() allows you to modify the vals
that are used in the create()).
These _prepare_* functions are new in OpenERP 6.1 and have been
contributed by Akretion through merge proposals. You will find them also
for invoice lines from SO and invoice lines from PO, when the invoice is
generated from PO/SO and when the invoice is generated from the picking.
This function _prepare_invoice() doesn't exist on purchase orders yet (I
plan to do the merge proposal for this some day...)
Regards,
--
Alexis
Le 08/08/2012 00:03, Christophe Combelles a écrit :
Hi,
just to let you know that we have a 6.1 branch of additional_discount
from E-nova http://apps.openerp.com/addon/6407 :
https://code.launchpad.net/~anybox/+junk/additional_discount_6.1/
regards,
Christophe
_______________________________________________
Mailing list: https://launchpad.net/~openerp-community
Post to : openerp-community@xxxxxxxxxxxxxxxxxxx
Unsubscribe : https://launchpad.net/~openerp-community
More help : https://help.launchpad.net/ListHelp
Follow ups
References