-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
18.0 gato tutorials #634
18.0 gato tutorials #634
Conversation
…verse function for validity and onchange function for garden
…ept and refuse buttons to offers.
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.
hello, a small review (commit by commit so some comments might be noted as outdated) mainly regarding guidelines
good work already !
Try to fix your indentation, and try to get a clean history (multiple commit can be fixup'ed or add .swp file in gitignore in the first commit.) but this will probably means learning more on git commands :)
realestatinator/__init__.py
Outdated
@@ -0,0 +1,3 @@ | |||
# -*- coding: utf-8 -*- |
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.
those lines are not necessary anymore :)
'base', | ||
'web', |
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.
keep only one indentation
realestatinator/__manifest__.py
Outdated
'application': True, | ||
'auto_install': False, | ||
'version': '0.1', | ||
|
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.
remove useless line
sequence = fields.Integer('Sequence', default=0) | ||
name = fields.Char('Name', required=True, translate=True) |
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.
try to sort in alphabetical order your fields
(well.. name is often the first one though..)
from odoo import fields, models | ||
|
||
class EstatePropery(models.Model): | ||
_name = '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.
we use '.' for model naming instead of '_'
@@ -11,6 +11,8 @@ | |||
], | |||
'data': [ | |||
'security/ir.model.access.csv', | |||
'views/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.
you can fixup all the commit "Chapter 5" inside the same commit. Check git documentation on interactive rebase / fixup if needed :)
<h1><field name='name'/></h1> | ||
<group> | ||
<group> | ||
<field name='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.
you really have an issue with indentations :D
<record id="estate_property_model_list" model="ir.ui.view"> | ||
<field name="name">estate_property_list</field> |
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.
Guildines for views :
id="estate_property_view_search" = 'modelName_view_viewType'
and the name should be the same but using '.' instead of '_'
apply this everywhere (on all views - not actions) :)
<field name='facades'/> | ||
<separator/> | ||
<filter string="Include archived" name="archived" domain="['|', ('active', '=', True), ('active', '=', False)]"/> | ||
<filter string="Available Properties" name="available" domain="['|', ('state', '=', 'new'), ('state', '=', 'offer_received')]"/> |
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.
you can also use this syntax :
domain="[('state', 'in', ['new', 'offer_received'])]"
|
||
|
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.
remove useless lines
ch.10 - added constraints on expected_price, selling_price, offer_price, tag_name and type_name ch.10 - Modified constraint on selling price: must be at least 90% of expected price to move to next stage
ch.11 - added list of properties to property types ch.11 - added status bar to estate_property ch.11 - added oredering to estate_property, offer, tags and types ch.11 - added sequence and manual sorting to types ch.11 - prevented adding types in estate property form, added color to tags. ch.11 - hide sell and cancel buttons when they may not be used. ch.11 - garden options are invisible when garden is disabeled, accept and refuse buttons on offers are hidden when the offer is accepted or refused, offers cannot be added or edited once an offer has been accepted. ch.11 - made offers and tags editable, made date_available optional on the list view ch.11 - added colors to various fields ch.11 - made availability the default filter for estate_property_list_view, added search on living area greater or equal to given value ch.11 - add action button to offers
f5f2143
to
0f407c6
Compare
ch.12 - only allow deleting a property if it's new or cancelled, only allow to create an offer if it's higher than the current highest, automatically move to state offer_received ch.12 - Added list of properties to users form
ch.13 - created estate_accountinator ch.13 - overwrote mark_sold() in estateaccountinator ch.13 - create empty invoice upon selling a property ch.13 - added 2 lines to invoices
ch.14 - added kanban view to estate proprerties ch.14 - added price fields to kanban view ch.14 - kanban default group by state, prevent drag and drop
Exercises for the tutorials up to the beginning of chapter 9