Skip to content

Conversation

sawer-odoo
Copy link

sawer chapter 2

@robodoo
Copy link

robodoo commented Oct 20, 2025

Pull request status dashboard

@Mathilde411 Mathilde411 changed the title Chapter 2 SAWER Onboarding Oct 20, 2025
@Mathilde411 Mathilde411 requested a review from dery-odoo October 20, 2025 11:47
@sawer-odoo sawer-odoo force-pushed the 19.0-onboarding-sawer branch from 6c30ded to c0452ec Compare October 21, 2025 06:57
Copy link

@Mathilde411 Mathilde411 left a comment

Choose a reason for hiding this comment

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

Small comments :)

@@ -0,0 +1,2 @@
id,name,model_id/id,group_id/id,perm_read,perm_write,perm_create,perm_unlink
access_estate_property,access_estate_property,model_estate_property,base.group_user,1,1,1,1 No newline at end of file

Choose a reason for hiding this comment

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

End of file line is missing here


</menuitem>

</odoo> No newline at end of file

Choose a reason for hiding this comment

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

End of file line is missing here

</field>
</record>

</odoo> No newline at end of file

Choose a reason for hiding this comment

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

End of file line is missing here

Comment on lines 9 to 54
name = fields.Char(
string='Name',
required=True
)
description = fields.Text(string='Description')
postcode = fields.Char(string='Post code')
date_availability = fields.Date(
string='Availability date',
default=fields.Date.add(fields.Date.today(), months=3),
copy=False
)
expected_price = fields.Float(string='Expected price', required=True)
selling_price = fields.Float(
string='Selling price',
readonly=True,
copy=False
)
bedrooms = fields.Integer(
string='Bedrooms',
default=2
)
living_area = fields.Integer(string='Living area')
facades = fields.Integer(string='Facades')
garage = fields.Boolean(string='Garage')
garden = fields.Boolean(string='Garden')
garden_area = fields.Integer(string='Garden area')
garden_orientation = fields.Selection(
string='Garden orientation',
selection= [('north', 'North'), ('south', 'South'), ('east', 'East'), ('west', 'West')]
)
active = fields.Boolean(
string='Active',
default=True
)
state = fields.Selection(
string='State',
selection= [('new', 'New'), ('offer_received', 'Offer Received'), ('offer_accepted', 'Offer Accepted'), ('sold', 'Sold'), ('cancelled', 'Cancelled')],
default='new'
)

Choose a reason for hiding this comment

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

Suggested change
name = fields.Char(
string='Name',
required=True
)
description = fields.Text(string='Description')
postcode = fields.Char(string='Post code')
date_availability = fields.Date(
string='Availability date',
default=fields.Date.add(fields.Date.today(), months=3),
copy=False
)
expected_price = fields.Float(string='Expected price', required=True)
selling_price = fields.Float(
string='Selling price',
readonly=True,
copy=False
)
bedrooms = fields.Integer(
string='Bedrooms',
default=2
)
living_area = fields.Integer(string='Living area')
facades = fields.Integer(string='Facades')
garage = fields.Boolean(string='Garage')
garden = fields.Boolean(string='Garden')
garden_area = fields.Integer(string='Garden area')
garden_orientation = fields.Selection(
string='Garden orientation',
selection= [('north', 'North'), ('south', 'South'), ('east', 'East'), ('west', 'West')]
)
active = fields.Boolean(
string='Active',
default=True
)
state = fields.Selection(
string='State',
selection= [('new', 'New'), ('offer_received', 'Offer Received'), ('offer_accepted', 'Offer Accepted'), ('sold', 'Sold'), ('cancelled', 'Cancelled')],
default='new'
)
name = fields.Char(required=True)
description = fields.Text()
postcode = fields.Char()
date_availability = fields.Date(
string='Availability date',
default=fields.Date.add(fields.Date.today(), months=3),
copy=False
)
expected_price = fields.Float(required=True)
selling_price = fields.Float(
readonly=True,
copy=False
)
bedrooms = fields.Integer(default=2)
living_area = fields.Integer()
facades = fields.Integer()
garage = fields.Boolean()
garden = fields.Boolean()
garden_area = fields.Integer()
garden_orientation = fields.Selection(
selection= [('north', 'North'), ('south', 'South'), ('east', 'East'), ('west', 'West')]
)
active = fields.Boolean(default=True)
state = fields.Selection(
selection= [('new', 'New'), ('offer_received', 'Offer Received'), ('offer_accepted', 'Offer Accepted'), ('sold', 'Sold'), ('cancelled', 'Cancelled')],
default='new'
)

Here the string are correctly generated from the variable names,no need for them :)


class EstateProperty(models.Model):
_name = "estate.property"
_description = "Create a new table"

Choose a reason for hiding this comment

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

Description should be a human readable name for you model.
e.g. for model with _name = 'sale.order' we have _description = "Sales Order"

[ADD] Chapter 2 sawer - correction
[FIX] missing space correction
[FIX] estate.propety.offer_id existence verification

[FIX] trailing white space in estate_property_offer: 34
[FIX] missing files in button definition

[FIX] using unknown field "states" from copy paste
[FIX] blank spaces

[FIX] whitespace arround operator

[IMP] estate: Add notes.
[FIX] definition order in manifest.
@sawer-odoo sawer-odoo force-pushed the 19.0-onboarding-sawer branch from d3176f0 to 27e221e Compare October 22, 2025 15:13
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