Skip to content

[IMP] Add XML model records to models#561

Open
mmahrouss wants to merge 1 commit intoalphafrom
alpha-xml-models-mdms
Open

[IMP] Add XML model records to models#561
mmahrouss wants to merge 1 commit intoalphafrom
alpha-xml-models-mdms

Conversation

@mmahrouss
Copy link
Copy Markdown
Collaborator

@mmahrouss mmahrouss commented Mar 10, 2026

Depends on the fix to go to def on XMl panicking or going to wrong file https://github.com/odoo/odoo-ls/pull/551/changes#r2953025503

@mmahrouss mmahrouss force-pushed the alpha-xml-models-mdms branch 6 times, most recently from dfb81f8 to 00bf4ba Compare March 17, 2026 16:15
}
// Also compute mandatory fields from XML-defined ir.model.fields records
for (field_name, field_records) in xml_field_records.iter() {
if mandatory_fields.contains(field_name) {
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What if an XML field is just added to make a field not required?

@mmahrouss mmahrouss force-pushed the alpha-xml-models-mdms branch 3 times, most recently from 65c3b4f to 7336cc3 Compare March 18, 2026 12:35
@mmahrouss mmahrouss changed the base branch from alpha-fix-go-to-def-mdms to alpha March 18, 2026 13:24
@mmahrouss mmahrouss force-pushed the alpha-xml-models-mdms branch 3 times, most recently from 87c9a99 to 62c1484 Compare March 19, 2026 10:35
@mmahrouss mmahrouss marked this pull request as ready for review March 19, 2026 10:35
@mmahrouss mmahrouss changed the title WIP: [IMP] Add XML model records to models [IMP] Add XML model records to models Mar 19, 2026
@mmahrouss mmahrouss requested a review from fda-odoo March 19, 2026 10:35
@mmahrouss mmahrouss self-assigned this Mar 19, 2026
@mmahrouss mmahrouss added the enhancement New feature or request label Mar 19, 2026
@mmahrouss mmahrouss added this to the 1.3.0 milestone Mar 19, 2026
@fda-odoo
Copy link
Copy Markdown
Collaborator

can you rebase this one too? @mmahrouss

This adds xml models and fields in the model struct.
It is also handled in hover, definition, ... .
Also includes tests
@mmahrouss mmahrouss force-pushed the alpha-xml-models-mdms branch from 62c1484 to 594510a Compare March 20, 2026 15:39
@mmahrouss
Copy link
Copy Markdown
Collaborator Author

@fda-odoo rebased

Copy link
Copy Markdown
Collaborator

@fda-odoo fda-odoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have to discuss this PR, because I think a refactoring is needed at this point.
Model class has been designed to only keep reference to symbols that build the model. Here it holds copies of OdooDataRecord.
Maybe we have to update the structure so that OdooDataRecord are part of the Symbol tree.
get_member is wrong too, as it is not browsing xml_symbols added to Model, same for all_members

@fda-odoo fda-odoo modified the milestones: 1.3.0, 1.5.0 Mar 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants