account_invoice_line_standalone

2 views
Skip to first unread message

Jan Grasnick | grasbauer ug

unread,
Jan 27, 2012, 4:40:05 AM1/27/12
to tryto...@googlegroups.com
Hi,

I think there is an issue in account_invoice_line_standalone, because in account_invoice_line the link to a invoice is required. So it is impossible to create a standalone invoice line.

def write(self, ids, vals):
    if vals.get('invoice', 0) < 0:
        vals = vals.copy()
        del vals['invoice']
    return super(InvoiceLine, self).write(ids, vals)

fixes this problem, but I don't know, if this change is matching the ideas behind this module.

Regards
Jan

Cédric Krier

unread,
Jan 27, 2012, 5:17:34 AM1/27/12
to tryto...@googlegroups.com
On 27/01/12 10:40 +0100, Jan Grasnick | grasbauer ug wrote:
> Hi,
>
> I think there is an issue in account_invoice_line_standalone,
> because in account_invoice_line the link to a invoice is required.

Only if you don't fill: invoice_type, party, currency and company.
But reading the code, I think perhaps the states is buggy (need to test).

--
Cédric Krier

B2CK SPRL
Rue de Rotterdam, 4
4000 Liège
Belgium
Tel: +32 472 54 46 59
Email/Jabber: cedric...@b2ck.com
Website: http://www.b2ck.com/

Reply all
Reply to author
Forward
0 new messages