Skip to content

Instantly share code, notes, and snippets.

@wisaruthk
Last active July 18, 2016 08:34
Show Gist options
  • Save wisaruthk/20353468ec4f08391feb4acc3078511e to your computer and use it in GitHub Desktop.
Save wisaruthk/20353468ec4f08391feb4acc3078511e to your computer and use it in GitHub Desktop.
odoo api / create purchase order line and Many2Many tax
order_line_id = self.models.execute_kw(self.db, self.uid, self.password, 'purchase.order.line', 'create',
[{'order_id': opo_id,
'partner_id':partner_id,
'name': product['name'],
'product': product,
'product_qty': xpo_line['ordqty'],
'price_unit': xpo_line['unitpr'],
'date_planned':rcvdat,
'taxes_id':[(6,False,[tax_id])],
}])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment