← Back to team overview

openerp-community team mailing list archive

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

 

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

Follow ups