← Back to team overview

openerp-community team mailing list archive

Re: should I modify the core account_invoice class for the following functionality?

 

Actually, I am wondering why those fields are hardcoded and not in a
table, which would add great flexibility in the modification and
versatility of the code.

Eric 

On ven., 2010-07-23 at 17:20 +0200, Bika wrote:

> hi,
> 
> I would like to change 2 things to have advance invoices that follow
> the Hungarian law. My question is whether such a modification in
> account_invoice would be accepted. If not, I would like to ask for
> some ideas how to implement the required functionality.
> 
> what I would modify is 
> class account_invoice()
>     _columns = {
>         'type': fields.selection([
>             ('out_invoice','Customer Invoice'),
>             ('in_invoice','Supplier Invoice'),
>             ('out_refund','Customer Refund'),
>             ('in_refund','Supplier Refund'),
>             ('out_advance', 'Advance Customer Invoice'),
>             ('in_advance', 'Advance Supplier Invoice'),
>             ],'Type', readonly=True, select=True),
>     }
> 
> thus 2 new types would be added. Of course, this means that other
> parts of the code (e.g. the rml files) should reflect these changes as
> well.
> 
> Second, I would modifiy sale.wizard.make_invoice_advance to use
> 'out_advance' for invoice type.
> 
> As the current implementation hard-codes these values, I can't see any
> better option or is there a simple way to create a new module that
> changes only these parts of the functionality? If so, I would like to
> ask your help.
> 
> thanks, 
> Viktor
> 
> _______________________________________________
> 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

References