Le Fri, 24 Sep 2010 12:25:38 +0200, Paul J Stevens <[email protected]> a écrit :
> > Hi all, > > I'm working on an xmlrpc connector where I now need to generate > invoices and handle them. > > I can generate an invoice, add invoice lines, and assign taxes to the > invoice-lines. But I can't seem to get the invoice-taxes recalculated > on the invoice itself! > > Also, when I assign an invoice-line for a product that has taxes > assigned to the category, I still need to walk the category tree for > the first parent to have taxes to lookup the tax-ids even though > 'taxes_category' was set True. > > So: I'm under the impression that either the on_change handlers are > not called when using rpc. Or else, calling > model.account.invoice.create() does not trigger them. Is that > correct, or do I need to use some additional magic? > > > on_change is handled client side: - To know if on_change exist for a field you have to call "fields_get" on the model you are working on, this will give you a description for each field. But you probably already know it. - This description (a dictionary) will eventually contains an on_change key associated with a list of field names. Then you have to do an rpc "on_change_field_name" and pass those fields. Also, IIRC proteus does handle this for your (or at least is it planned). HTH, Bertrand -- Bertrand Chenal B2CK SPRL Rue de Rotterdam, 4 4000 Liège Belgium Tel: +32 472 54 46 59 Email: [email protected] Website: http://www.b2ck.com/ -- [email protected] mailing list
