-
Notifications
You must be signed in to change notification settings - Fork 748
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
Oxp24 technical training Chariots_dev #69
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here it should be EstatePropertyOffer for example
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just another way than the slides
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): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same Comment here
<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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe the naming of the id could be more explicit here like "estate_property_menu"
Does this show you the whole project, or just the modifications in the respective branches?