Skip to content

Conversation

@Stolexiy
Copy link
Collaborator

@Stolexiy Stolexiy commented Feb 26, 2024

This pull request addresses several issues encountered while using the go-odoo module with Odoo 17:

  1. Error handling for all models generation: Ensures that the generator gracefully handles errors that may occur when attempting to generate code for all available models, preventing unexpected crashes.
  2. Compatibility with models lacking ID property: Addresses an issue where models in Odoo 17 that lack an ID property (e.g., mixins) caused broken file generation due to the reliance on the ID for various methods.
  3. Correct variable naming for MailActivityPlan model: Fixes an issue where the generator incorrectly created a variable named map for the MailActivityPlan model, which caused errors.
  4. Context options for the Create() method: Introduces optional context parameters for the Create() method, allowing for more flexibility when creating model instances. This addition addresses specific use cases, such as setting the install_mode=true context for the res.user model to create an archived user or without sending emails.

Note: Adding context options to Create() introduces a backward compatibility issue. Therefore, it is only implemented for the Create() method, and the template needs to be updated to incorporate this functionality into higher-level methods if needed.

…ID prop. Fix using 'map' VarName. Allow options on client.Create()
@ahuret
Copy link
Collaborator

ahuret commented Feb 26, 2024

LGTM, thanks a lot 🔥
Merging

@ahuret ahuret merged commit 65da36b into skilld-labs:master Feb 26, 2024
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