Skip to content

19.0 technical training manab - #1431

Open
manab-odoo wants to merge 10 commits into
odoo:19.0from
odoo-dev:19.0-Technical-Training-manab
Open

manab-odoo wants to merge 10 commits into
odoo:19.0from
odoo-dev:19.0-Technical-Training-manab

Conversation

@manab-odoo

Copy link
Copy Markdown

First PR with Chapter 1 to 5 done and Chapter 6 half done

@robodoo

robodoo commented Sep 16, 2026

Copy link
Copy Markdown

Pull request status dashboard

@lost-odoo lost-odoo left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Hi thanks for you pull request,

I made a small review, sometimes I put a comment for one thing but it applies to other files as well.

Good Job :D

@@ -0,0 +1,43 @@
from odoo import models, fields

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Do not forget the make your runbot green, for instance here it should complain because it does not have two lines before the class definition.

name = fields.Char('Nom', required=True)
description = fields.Text('Description')
postcode = fields.Char('Post Code')
date_availability = fields.Date('Date Availability', copy=False, default=fields.Date.add(fields.Date.today(), months=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.

here default should use a lambda function otherwise the default would be static depending on when the server started not at record creation.

Comment thread estate/models/estate_property.py Outdated
Comment on lines +22 to +25
('north', 'North'),
('south','South'),
('east','East'),
('west','West')

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

You should use single quotes for technical string and double quotes for user interface strings.

Comment thread estate/models/estate_property_type.py Outdated
_name = "estate.property.type"
_description = "Types of Estate Property"

name = fields.Char('Nom', required=True) 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.

Do not forget the final newline.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

You should avoid pushing empty files but I guess it is because you are working on it. But just in case 😄

Comment on lines +29 to +41
state = fields.Selection(
string='State',
selection=[
('new', 'New'),
('offer_received', 'Offer Received'),
('offer_accepted', 'Offer accepted'),
('sold', 'Sold'),
('cancelled', 'Cancelled')
],
required=True,
copy=False,
default='new'
)

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
state = fields.Selection(
string='State',
selection=[
('new', 'New'),
('offer_received', 'Offer Received'),
('offer_accepted', 'Offer accepted'),
('sold', 'Sold'),
('cancelled', 'Cancelled')
],
required=True,
copy=False,
default='new'
)
state = fields.Selection(
string='State',
selection=[
('new', 'New'),
('offer_received', 'Offer Received'),
('offer_accepted', 'Offer accepted'),
('sold', 'Sold'),
('cancelled', 'Cancelled')
],
required=True,
copy=False,
default='new',
)

Be careful at your indentation as well as the final comma, it is better to always add it so that later if someone wants to add a new line in here, it won't trigger a diff on the final line you added.

Comment thread estate/models/estate_property.py Outdated
('north', 'North'),
('south','South'),
('east','East'),
('west','West')

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
('west','West')
('west','West'),

Comment on lines +51 to +75
<group>
<field name="description" string="Description"/>
</group>
<group>
<field name="bedrooms" string="Bedrooms"/>
</group>
<group>
<field name="living_area" string="Living Area (sqm)"/>
</group>
<group>
<field name="facades" string="Facades"/>
</group>
<group>
<field name="garage" string="Garage"/>
</group>
<group>
<field name="garden" string="Garden"/>
</group>
<group>
<field name="garden_area" string="Garden Area (sqm)"/>
</group>
<group>
<field name="garden_orientation" string="Garden Orientation"/>
<field name="state" string="State"/>
</group>

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 doing so many groups ?

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