19.0 technical training manab - #1431
manab-odoo wants to merge 10 commits into
Conversation
lost-odoo
left a comment
There was a problem hiding this comment.
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 | |||
|
|
|||
There was a problem hiding this comment.
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)) |
There was a problem hiding this comment.
here default should use a lambda function otherwise the default would be static depending on when the server started not at record creation.
| ('north', 'North'), | ||
| ('south','South'), | ||
| ('east','East'), | ||
| ('west','West') |
There was a problem hiding this comment.
You should use single quotes for technical string and double quotes for user interface strings.
| _name = "estate.property.type" | ||
| _description = "Types of Estate Property" | ||
|
|
||
| name = fields.Char('Nom', required=True) No newline at end of file |
There was a problem hiding this comment.
You should avoid pushing empty files but I guess it is because you are working on it. But just in case 😄
| 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' | ||
| ) |
There was a problem hiding this comment.
| 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.
| ('north', 'North'), | ||
| ('south','South'), | ||
| ('east','East'), | ||
| ('west','West') |
There was a problem hiding this comment.
| ('west','West') | |
| ('west','West'), |
| <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> |

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