-
Notifications
You must be signed in to change notification settings - Fork 2.5k
trcaz - Tutorial PR #944
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?
trcaz - Tutorial PR #944
Conversation
Update commit messages according to |
…fix search group by & menu names
# -*- coding: utf-8 -*- | ||
# Part of Odoo. See LICENSE file for full copyright and licensing details. | ||
|
||
from . import models |
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.
Add an empty line at the end of every file
'views/estate_property_views.xml', | ||
'views/estate_menus.xml', # depends on estate_property_views.xml | ||
] | ||
} |
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.
Add an empty line at the end of every 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.
estate/__manifest__.py
Outdated
'data': [ | ||
'security/ir.model.access.csv', | ||
'views/estate_property_views.xml', | ||
'views/estate_menus.xml', # depends on estate_property_views.xml |
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.
Comments like this can be nice but this is not maintainable because the menus will depend on every view you add so you would need to update this comment every time you add a new view 😄
I think if the dependency is not easy to understand adding a comment is important but in this case not really necessary.
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.
I was doing that for myself in order to remember it since this is a tutorial. Should I delete the comments?
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.
No of course not 😄 I'm trying to get you used to the nitpicking that will happen on your PR's after the onboarding.
estate/models/__init__.py
Outdated
# -*- coding: utf-8 -*- | ||
# Part of Odoo. See LICENSE file for full copyright and licensing details. | ||
|
||
from . import estate_property |
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.
Add an empty line at the end of every file
</search> | ||
</field> | ||
</record> | ||
</odoo> |
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.
Add one empty line at the end of the file
<field name="living_area" /> | ||
<field name="facades" /> | ||
<filter string="Available" name="available" domain="['|', ('state', '=', 'new'), ('state', '=', 'offerreceived')]"/> | ||
<group expand="0" string="Group By"> |
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.
Wait does this work 😮
We had a problem with lecan in the morning and it was caused by the attributes in group
estate/models/estate_property.py
Outdated
active = fields.Boolean(default=True) | ||
state = fields.Selection( | ||
string='State', | ||
selection=[("new", "New"), ("offerreceived", "Offer Received"), ("offeraccepted", "Offer accepted"), ("sold", "Sold"), ("cancelled", "Cancelled")], |
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.
selection=[("new", "New"), ("offerreceived", "Offer Received"), ("offeraccepted", "Offer accepted"), ("sold", "Sold"), ("cancelled", "Cancelled")], | |
selection=[("new", "New"), ("offer_received", "Offer Received"), ("offer_accepted", "Offer accepted"), ("sold", "Sold"), ("cancelled", "Cancelled")], |
use snake case for values with multiple words
<field name="facades" /> | ||
<filter string="Available" name="available" domain="['|', ('state', '=', 'new'), ('state', '=', 'offerreceived')]"/> | ||
<group expand="0" string="Group By"> | ||
<filter string="Postcode" name="group_by_postcode" domain="[]" context="{'group_by':'postcode'}"/> |
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.
<filter string="Postcode" name="group_by_postcode" domain="[]" context="{'group_by':'postcode'}"/> | |
<filter string="Postcode" name="group_by_postcode" context="{'group_by':'postcode'}"/> |
<field name="arch" type="xml"> | ||
<form string="Property form test string?"> | ||
<sheet> | ||
<div class="oe_title"> |
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.
Why is everything inside an oe_title div 😄
No description provided.