Oxp24 technical training Chariots_dev#69
Open
chariots-dev wants to merge 48 commits intoodoo:masterfrom
Open
Conversation
Author
jnc-odoo
reviewed
Oct 8, 2024
jnc-odoo
left a comment
There was a problem hiding this comment.
Good job
just be carefull with the naming of the class
If you want to finish the tutorial, don't hesitate to ping me if you want review for the rest :)
| from odoo import models, fields, api | ||
|
|
||
| # this is creating a table | ||
| class RealEstate(models.Model): |
There was a problem hiding this comment.
Usually we try to have the same as the name of the model so here EstateProperty
| from odoo import models, fields, api | ||
|
|
||
| # this is creating a table | ||
| class RealEstate(models.Model): |
There was a problem hiding this comment.
Here it should be EstatePropertyOffer for example
Comment on lines
+22
to
+25
| if not record.create_date: | ||
| record.date_deadline = fields.Date.add(value=fields.Date.today(), days=record.validity) | ||
| else: | ||
| record.date_deadline = fields.Date.add(value=record.create_date, days=record.validity) |
There was a problem hiding this comment.
Just another way than the slides
Suggested change
| if not record.create_date: | |
| record.date_deadline = fields.Date.add(value=fields.Date.today(), days=record.validity) | |
| else: | |
| record.date_deadline = fields.Date.add(value=record.create_date, days=record.validity) | |
| date = record.create_date or record.create_date | |
| record.date_deadline = fields.Date.add(value=date, days=record.validity) |
| from odoo import models, fields | ||
|
|
||
| # this is creating a table | ||
| class RealEstate(models.Model): |
| <odoo> | ||
| <menuitem id="real_test_app" name="REAL TEST"> | ||
| <menuitem id="second_level_menu" name="Estate"> | ||
| <menuitem id="third_level_menuitem" name="Properties" action="estate_property_window"/> |
There was a problem hiding this comment.
Maybe the naming of the id could be more explicit here like "estate_property_menu"
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Does this show you the whole project, or just the modifications in the respective branches?