-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
plha #228
base: 18.0
Are you sure you want to change the base?
plha #228
Conversation
Great progress so far. 😊 Kindly ensure that you follow the commit message structure outlined in the Odoo documentation: Git Guidelines. |
12c851e
to
0df9ae8
Compare
garden = fields.Boolean() | ||
garden_area= fields.Integer() | ||
garden_orientation = fields.Selection([("North","North"),("South","South"),("East","East"),("West","West")]) | ||
|
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.
remove extra line
estate/models/estate_property.py
Outdated
garden_area= fields.Integer() | ||
garden_orientation = fields.Selection([("North","North"),("South","South"),("East","East"),("West","West")]) | ||
active = fields.Boolean(default=True) | ||
state = fields.Selection([("New","New"),("Offer Received","Offer Received"),("Offer Accpeted","Offer Accepted"),("Solde","Solde"),("Cancelled","Cancelled")],copy=False,default="New") |
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.
state = fields.Selection([("New","New"),("Offer Received","Offer Received"),("Offer Accpeted","Offer Accepted"),("Solde","Solde"),("Cancelled","Cancelled")],copy=False,default="New") | |
state = fields.Selection([ | |
("new", "New"), | |
("offer_received", "Offer Received"), | |
("offer_accepted", "Offer Accepted"), | |
("sold", "Sold"), | |
("cancelled", "Cancelled") | |
], copy=False, default="new") |
garage = fields.Boolean() | ||
garden = fields.Boolean() | ||
garden_area= fields.Integer() | ||
garden_orientation = fields.Selection([("North","North"),("South","South"),("East","East"),("West","West")]) |
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.
garden_orientation = fields.Selection([("North","North"),("South","South"),("East","East"),("West","West")]) | |
garden_orientation = fields.Selection([("north","North"),("south","South"),("east","East"),("west","West")]) |
Use lowercase keys for state values for consistency with Odoo's best practices.
|
||
property_type_id= fields.Char('Property Offer ID') | ||
price = fields.Float('Le Prix') | ||
status = fields.Selection([("Accepted","Accepted"),("Refused","Refused")],copy=False) |
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.
status = fields.Selection([("Accepted","Accepted"),("Refused","Refused")],copy=False) | |
status = fields.Selection([("accepted","Accepted"), ("refused","Refused")], copy=False) |
estate/models/property_offer.py
Outdated
_name = "estate.property.offer" | ||
_description = "reals estate properties offer" | ||
|
||
property_type_id= fields.Char('Property Offer ID') |
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.
property_type_id= fields.Char('Property Offer ID') | |
property_offer_id= fields.Char('Property Offer ID') |
misleading name
from datetime import date, timedelta | ||
|
||
class EstatePropertyType(models.Model): | ||
_name = "estate.property.tags" |
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.
_name = "estate.property.tags" | |
_name = "estate.property.tag" |
a record represents only one tag
<field name="type">list</field> | ||
<field name="arch" type="xml"> | ||
|
||
<list string="Tests"> |
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.
<list string="Tests"> | |
<list string="Property Type List"> |
<list string="Tests"> | ||
<field name="name"/> | ||
<field name="property_type_id"/> | ||
<field name = "properties" widget="many2many_tags"/> |
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.
<field name = "properties" widget="many2many_tags"/> | |
<field name="properties" widget="many2many_tags"/> |
The properties field uses widget="many2many_tags" in a list view. However, it may not work as intended in this context since list views are for quick overviews, and this widget is more suitable for form views. Consider displaying a count of related properties instead.
<field name="model">estate.property.types</field> | ||
<field name="type">form</field> | ||
<field name="arch" type="xml"> | ||
<form string="Test"> |
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.
<form string="Test"> | |
<form string="Property Type Form"> |
<field name="type">search</field> | ||
<field name="arch" type="xml"> | ||
|
||
<search string="Tests"> |
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.
<search string="Tests"> | |
<search string="Search property type"> |
|
||
<list string="Tests"> | ||
<field name="name"/> | ||
<field name="property_type_id"/> |
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.
Including property_type_id is redundant as the name field already provides a clear identifier for the type.
[ADD] first commit of the tutorials of the onboarding