-
Notifications
You must be signed in to change notification settings - Fork 2.6k
SAWER Onboarding #997
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
base: 19.0
Are you sure you want to change the base?
SAWER Onboarding #997
Conversation
6c30ded
to
c0452ec
Compare
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.
Small comments :)
estate/security/ir.model.access.csv
Outdated
@@ -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 |
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.
End of file line is missing here
estate/views/estate_menus.xml
Outdated
|
||
</menuitem> | ||
|
||
</odoo> No newline at end of file |
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.
End of file line is missing here
</field> | ||
</record> | ||
|
||
</odoo> No newline at end of file |
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.
End of file line is missing here
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' | ||
) |
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 = 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 :)
estate/models/estate_property.py
Outdated
|
||
class EstateProperty(models.Model): | ||
_name = "estate.property" | ||
_description = "Create a new table" |
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.
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.
d3176f0
to
27e221e
Compare
sawer chapter 2