Skip to Content
Menu
This question has been flagged

I try to import a sales order from an online shop. Because of different tax calculations, that leads to rounding errors, the total price of the order can differ by multiple cents.


For odoo itself there is the option with a B2C pricelist: https://www.odoo.com/documentation/17.0/applications/finance/accounting/taxes/B2B_B2C.html


But I create the Odoo 17 sale order via the XML-API with the following data:

{
  "carrier_id": 3,
  "client_order_ref": "13725",
  "company_id": 1,
  "name": "Order 13725",
  "note": "thanks :-)",
  "order_line": [
    [
      0,
      0,
      {
        "product_id": 101,
        "display_name": "Demo Product #1",
        "name": "Demo Product #1",
        "product_uom_qty": 1,
        "price_unit": 1,
        "price_tax": 0.07,
        "tax_id": [
          [
            6,
            0,
            [
              76
            ]
          ]
        ]
      }
    ]
  ],
  "partner_id": 13895
}

How can I use gross prices (taxes included) via API when the `sale.order.line` field `price_total` is read-only.

Avatar
Discard
Related Posts Replies Views Activity
0
Mar 19
3362
1
Oct 16
3654
2
Jul 16
18728
1
May 15
9211
1
Mar 15
5420