← Back to team overview

openerp-community team mailing list archive

Re: additional_discount for 6.1

 

Hi Satyamitra,

thanks for this module, it was an excellent starting point for what we needed and we just started a first draft for the 6.1 compatibility and a bit of duplicated code removal. Alexis, thanks a lot for your suggestions based on your previous work. There is more work to do on this module: apart from these improvements and the accounting consistency we should also handle the case when there is a non proportional tax. There is also an urgent need for unit/yml test and I think it should be the very next thing to do.


Le 29/08/2012 18:21, satyamitra maan a écrit :
Dear friends,

Just looked at this discussion, As the author of this module I take
full responsibility for this mistake , somehow we missed to update the
final revision, will check with My team  and update it tomorrow
itself.

Apologize  again for our ignorance.

Thanks
Satyamitra maan
Ph +91 9990539414
Skype: maansatyamitra


On 8/29/12, Georges Racinet<gracinet@xxxxxxxxx>  wrote:
Hi Alexis,

On 08/29/2012 02:05 PM, Alexis de Lattre wrote:
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.

Christophe may develop further on that, but as far as I understand it,
we did the bare minimum to port this existing community module to
OpenERP 6.1 (I did lately a bit of refactoring that has yet to be
validated in real life, but should be iso-functional).

So, thanks for the very useful remarks, we'll take them into account
sooner or later. Would you be so kind to file them as launchpad tickets?
I'd like also to stress that we will of course welcome pull requests
heartily.

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.

Okay, improvements specific to 6.1, no wonder we don't have them yet.
One question though : are they available in all 6.1 versions ?


This function _prepare_invoice() doesn't exist on purchase orders yet (I
plan to do the merge proposal for this some day...)

Regards,

Thanks again


--
Georges Racinet
Anybox SAS, http://anybox.fr
Bureau: 09 53 53 72 97 Portable: 06 51 32 07 27
GPG: 0x33AB0A35, sur serveurs publics



_______________________________________________
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