Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[16.0] api_sale: some cleanup, fixes and improvements ;-) #9

Merged

Conversation

lmignon
Copy link

@lmignon lmignon commented Nov 4, 2023

The uuid field is also removed from the 'Sale' schema since it's a specific field introduced by the use of the sale_cart api. It will be added in the schema in the shopinvader_api_cart
Add 'env' as paramter of the 'to_odoo_domain' method of the 'SaleSearch' schema in order to allow use of the registry to transform provided paramters into a valid domain.
When a schema is processed to get the value provided in the case of a partial update, it's better to always take the value from the properties of the schema instance. The use of the dictionary returned by the 'model_dump' method should be limited to determine if a field has been provided or not in the original json message. This approach allows a better traceability of the use of defined fields and ease code analysis by external tools.
@sebastienbeau sebastienbeau merged commit f3349df into akretion:16.0-add-api-sale Nov 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants