Skip to content
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

Closed
wants to merge 16 commits into from
Closed

Conversation

gato-odoo
Copy link

Exercises for the tutorials up to the beginning of chapter 9

@robodoo
Copy link

robodoo commented Mar 18, 2025

Pull request status dashboard

Copy link

@dbeguin dbeguin left a 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 :)

@@ -0,0 +1,3 @@
# -*- coding: utf-8 -*-
Copy link

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 :)

Comment on lines +9 to +10
'base',
'web',
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

keep only one indentation

'application': True,
'auto_install': False,
'version': '0.1',

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove useless line

Comment on lines 8 to 9
sequence = fields.Integer('Sequence', default=0)
name = fields.Char('Name', required=True, translate=True)
Copy link

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'
Copy link

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',
Copy link

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'/>
Copy link

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

Comment on lines 8 to 9
<record id="estate_property_model_list" model="ir.ui.view">
<field name="name">estate_property_list</field>
Copy link

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')]"/>
Copy link

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'])]"

Comment on lines 83 to 84


Copy link

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
@gato-odoo gato-odoo force-pushed the 18.0-gato-tutorials branch from f5f2143 to 0f407c6 Compare March 19, 2025 11:25
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
@gato-odoo gato-odoo closed this Mar 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants