Onboarding Juica Server 101 - #1391
Conversation
yoba-odoo
left a comment
There was a problem hiding this comment.
Good work 💪
Just a few comments, and always add a newline by the end of the file
| from . import estate_property | ||
| from . import estate_property_type | ||
| from . import estate_property_tag | ||
| from . import estate_property_offer No newline at end of file |
There was a problem hiding this comment.
We should always have a newline by the end of each file
There was a problem hiding this comment.
Damn I should've set up the linter haha
| copy=False, | ||
| default=fields.Date.today() + relativedelta(months=3) | ||
| ) | ||
|
|
There was a problem hiding this comment.
Not the best practice to have a newline in between the fields' definition, readability wise
| @@ -0,0 +1,76 @@ | |||
| from odoo import fields, models | |||
| from dateutil.relativedelta import relativedelta | |||
|
|
|||
There was a problem hiding this comment.
We normally should always have two blank lines before the definition of the class
| @@ -0,0 +1,8 @@ | |||
| from odoo import fields, models | |||
|
|
|||
| class EstatePropertyType(models.Model): | |||
There was a problem hiding this comment.
heads up for the typo here. This is EstatePropertyTag not Type 😅
There was a problem hiding this comment.
haha I shouldn't be copying file so freely, fixed
| self.garden_area = 10 if self.garden else 0 | ||
| # Nasty magic string. I should turn the option into a variable and then reference it | ||
| self.garden_orientation = "north" if self.garden else None |
There was a problem hiding this comment.
| self.garden_area = 10 if self.garden else 0 | |
| # Nasty magic string. I should turn the option into a variable and then reference it | |
| self.garden_orientation = "north" if self.garden else None | |
| if self.garden: | |
| self.garden_area = 10 | |
| # Nasty magic string. I should turn the option into a variable and then reference it | |
| self.garden_orientation = "north" | |
| else: | |
| self.garden_area = 0 | |
| self.garden_orientation = None |
better to have it like this instead of checking twice, wdyt?
There was a problem hiding this comment.
I would normally prefer a return inside the if self.garden and what would've been the else block as a fallback.
Something along the lines of:
if self.garden:
self.garden_area = 10
return
self.garden_area = 0idk enough about the company's guidelines or maybe what you usually do, so....
There was a problem hiding this comment.
That would be a good approach as well 👌
yoba-odoo
left a comment
There was a problem hiding this comment.
Good work 👏 👏
Just a few comments. Also try to make the ci/* checks to pass, check what are the errors and fix them
| @@ -0,0 +1 @@ | |||
| from . import estate_property No newline at end of file | |||
ef1b9ae to
7aec590
Compare
…ions on list views
…perty deletion when pending
c0a535b to
18d3715
Compare
18d3715 to
ab0b480
Compare

No description provided.