Skip to content

[ADD] estate: basic module creation#1245

Open
simal-odoo wants to merge 6 commits intoodoo:19.0from
odoo-dev:19.0-technical-training-simal
Open

[ADD] estate: basic module creation#1245
simal-odoo wants to merge 6 commits intoodoo:19.0from
odoo-dev:19.0-technical-training-simal

Conversation

@simal-odoo
Copy link
Copy Markdown

Created init and manifest files

Created init and manifest files
@robodoo
Copy link
Copy Markdown

robodoo commented Apr 22, 2026

Pull request status dashboard

@simal-odoo simal-odoo closed this Apr 22, 2026
@simal-odoo simal-odoo reopened this Apr 22, 2026
@Mathilde411 Mathilde411 self-requested a review April 22, 2026 11:08
Added fields in __manifest__.py
Created models folder, EstateProperty model with the required fields and imported it in __manifest__.py files
Created data folder and file ir.model.access.csv inside it giving read, write, create and unlink permissions to the group base.group_user
Added views and actions for estate.property.
Added a 3 level menu with the basic action
Added and improved attributes
Copy link
Copy Markdown

@Mathilde411 Mathilde411 left a comment

Choose a reason for hiding this comment

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

Good job !
I was kinda nitpicky but this is a good job overall :)

Comment thread estate/data/estate_menus.xml Outdated
Comment on lines +1 to +7
<odoo>
<menuitem id="estate_menu_root" name="Estate">
<menuitem id="estate_first_level_menu" name="Advertisements">
<menuitem id="estate_model_menu_action" action="estate_model_action"/>
</menuitem>
</menuitem>
</odoo> No newline at end of file
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

menus should be in the views dir not in data

Comment thread estate/data/estate_menus.xml Outdated
Comment on lines +3 to +4
<menuitem id="estate_first_level_menu" name="Advertisements">
<menuitem id="estate_model_menu_action" action="estate_model_action"/>
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

XMLids for menus should follow the doc

Suggested change
<menuitem id="estate_first_level_menu" name="Advertisements">
<menuitem id="estate_model_menu_action" action="estate_model_action"/>
<menuitem id="estate_menu_advertisement" name="Advertisement">
<menuitem id="estate_property_menu" action="estate_property_action"/>

Comment thread estate/data/ir.model.access.csv Outdated
@@ -0,0 +1,2 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_estate_property,access_estate_property,model_estate_property,base.group_user,1,1,1,1 No newline at end of file
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Missing newline at the end

Comment thread estate/data/ir.model.access.csv Outdated
@@ -0,0 +1,2 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_estate_property,access_estate_property,model_estate_property,base.group_user,1,1,1,1 No newline at end of file
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Missing newline at the end

Comment thread estate/data/ir.model.access.csv Outdated
@@ -0,0 +1,2 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_estate_property,access_estate_property,model_estate_property,base.group_user,1,1,1,1 No newline at end of file
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Just like record rules, access XMLids should be formatted like <model_name>_access_<group_name> (see documentation)

Suggested change
access_estate_property,access_estate_property,model_estate_property,base.group_user,1,1,1,1
estate_property_access_user,estate.property.user,model_estate_property,base.group_user,1,1,1,1

Comment thread estate/__manifest__.py Outdated
'data/estate_menus.xml',
],
'license': 'AGPL-3'
} No newline at end of file
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Missing newline

Comment thread estate/__manifest__.py Outdated
'views/estate_property_views.xml',
'data/estate_menus.xml',
],
'license': 'AGPL-3'
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Why AGPL ?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

It was because I was looking at the other manifest files in the tutorials repo as "inspiration" and they were under that one, but after looking it up it seems I should use LGPL-3 instead.

Comment thread estate/__manifest__.py Outdated
'category': 'Tutorials',
'version': '0.1',
'application': True,
'installable': True,
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

installable is True by default, no need to add it.

Comment thread estate/__manifest__.py Outdated
'version': '0.1',
'application': True,
'installable': True,
'depends': ['base'],
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggested change
'depends': ['base'],
'depends': [
'base',
],

Doing that allows to know when a dependency was added with a git blame :)

Comment thread estate/__manifest__.py Outdated
'author': "Odoo",
'website': "https://www.odoo.com/",
'category': 'Tutorials',
'version': '0.1',
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

For modules outside of Odoo standard, version should include the Odoo version you are targetting like <odoo major>.<odoo minor>.<module major>.<module minor>.<module patch>
So there it'd be like:

Suggested change
'version': '0.1',
'version': '19.0.0.1.0',

- Added newlines to the relevant files
- Changed license and version
- Moved menus form data to views folder
- Now follows formatting rules
Added list views to main menu
Added form view when creating property
Added search views, filters and group
@simal-odoo simal-odoo force-pushed the 19.0-technical-training-simal branch from 0b858e1 to 70fa394 Compare April 23, 2026 13:05
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.

3 participants