Skip to Content
Menu
This question has been flagged
3 Replies
814 Views

Hello. I'm trying to create a POS order through the External API but I'm not sure if some of the field ids are not correctly set up My code is:


I get the error message:

Error creating or reading POS order: The operation cannot be
completed:\n- Create/update: a mandatory field is not set.\n- Delete:
another model requires the record being deleted. If possible, archive
it instead.\n\nModel: Point of Sale Orders (pos.order)\nField: Taxes
(amount_tax)

If anyone knows how to fix it I would appreciate it.

Avatar
Discard

Please mention the Odoo version also.

Best Answer

Hi,

As per shared code there are some madatory fields are missing like amount_total, amount_paid ...etc.

Please find the below refernce code.

Hope it Helps!

Avatar
Discard
Best Answer

There are some required fields in model pos.order, amount_tax is one of them you have to fill the value for those fields. amount_paid, amount_return, amount_total, company_id, name, session_id these are the remaining required fields.

Avatar
Discard
Author Best Answer

Odoo 17.2


Avatar
Discard