Skip to content
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

Open
wants to merge 11 commits into
base: 18.0
Choose a base branch
from
Open

plha #228

wants to merge 11 commits into from

Conversation

plha-odoo
Copy link

@plha-odoo plha-odoo commented Jan 20, 2025

[ADD] first commit of the tutorials of the onboarding

@robodoo
Copy link

robodoo commented Jan 20, 2025

Pull request status dashboard

@nesma-neha
Copy link

Great progress so far. 😊

Kindly ensure that you follow the commit message structure outlined in the Odoo documentation: Git Guidelines.

@plha-odoo plha-odoo force-pushed the 18.0-tutorials-plha branch from 12c851e to 0df9ae8 Compare January 20, 2025 16:39
garden = fields.Boolean()
garden_area= fields.Integer()
garden_orientation = fields.Selection([("North","North"),("South","South"),("East","East"),("West","West")])

Choose a reason for hiding this comment

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

remove extra line

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")

Choose a reason for hiding this comment

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

Suggested change
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")])

Choose a reason for hiding this comment

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

Suggested change
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)

Choose a reason for hiding this comment

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

Suggested change
status = fields.Selection([("Accepted","Accepted"),("Refused","Refused")],copy=False)
status = fields.Selection([("accepted","Accepted"), ("refused","Refused")], copy=False)

_name = "estate.property.offer"
_description = "reals estate properties offer"

property_type_id= fields.Char('Property Offer ID')

Choose a reason for hiding this comment

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

Suggested change
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"

Choose a reason for hiding this comment

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

Suggested change
_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">

Choose a reason for hiding this comment

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

Suggested change
<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"/>

Choose a reason for hiding this comment

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

Suggested change
<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">

Choose a reason for hiding this comment

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

Suggested change
<form string="Test">
<form string="Property Type Form">

<field name="type">search</field>
<field name="arch" type="xml">

<search string="Tests">

Choose a reason for hiding this comment

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

Suggested change
<search string="Tests">
<search string="Search property type">


<list string="Tests">
<field name="name"/>
<field name="property_type_id"/>

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.

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.

4 participants