Odoo Help

1

XMLRPC update taxes_id and supplier_taxes_id

By
Thomas Klosinsky
on 4/2/15, 9:21 AM 1,774 views

I've been struggeling around with a magento-odoo-synchronization (base module by webkul) and got most of it working except tax sync. From Magento to Odoo it's done on Magento site in php...

The fields in Odoo are named taxes_id and supplier_taxes_id but when stating something like this in the product array:

For mapping have this code:

if($product->getTaxClassId() == 1){
$taxclass1 = 12;
$taxclass2 = 14;
}
if($product->getTaxClassId() == 2){
$taxclass1 = 13;
$taxclass2 = 15;
}

in the array this:

'taxes_id'=>new xmlrpcval($taxclass1, "string"),
'supplier_taxes_id'=>new xmlrpcval($taxclass2, "string"),

but nothing happens in Odoo...

Any ideas in this?

Thank you Serpent Consulting, but how do I implement that in the xmlrpcval?

Thomas Klosinsky
on 4/2/15, 1:18 PM

so, would this be correct then? $tax1 = array(new xmlrpcval( array( new xmlrpcval(6, "int"),// 6 : id link new xmlrpcval(0, "int"), new xmlrpcval(array(new xmlrpcval($taxclass1, "int")),"array") ),"array" ) ); in the following array this: 'taxes_id'=>new xmlrpcval($tax1, "string"), Didn't get it working so far... any help appreciated

Thomas Klosinsky
on 4/2/15, 2:04 PM

Answer can be found here: http://stackoverflow.com/questions/18851680/how-to-send-many2many-into-openerp-through-xmlrpc/21013324#21013324

Thomas Klosinsky
on 4/11/15, 4:58 PM
1

Serpent Consulting Services Pvt. Ltd.

--Serpent Consulting Services Pvt. Ltd.--
Serpent Consulting Services Pvt. Ltd.
http://www.serpentcs.com
4780
| 6 6 8
Gandhinagar, India
--Serpent Consulting Services Pvt. Ltd.--

Serpent Consulting Services Pvt. Ltd. is an Official Odoo Partner, working on Odoo ever since 2007, experience of 11+ years and witnessed the growth of Odoo.

We are a team of 80+ experts on various verticals. Our portfolio of products can be seen at http://www.serpentcs.com and http://www.serpentcs.in

Our Expertise and Services:

  • Odoo Support

  • Odoo Development

  • Odoo Training

  • Odoo Migration

  • Odoo Implementation

  • Odoo Consulting

Our 290+ Apps on Appstore : https://apps.odoo.com/apps/modules/browse?author=Serpent Consulting Services Pvt. Ltd.

Thanks.

Serpent Consulting Services Pvt. Ltd.
On 4/2/15, 12:38 PM

Hello,

To update the x2many(one2many/many2many) fields, you will have to follow the 3-element tuple syntax.

It is: [(6,0,[IDs])] for your case.

Thanks.

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Register

Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)

Stats

Asked: 4/2/15, 9:21 AM
Seen: 1774 times
Last updated: 7/15/17, 4:58 AM