Skip to content

18.0 tutorial drod#178

Closed
vandroogenbd wants to merge 9 commits into
odoo:18.0from
odoo-dev:18.0-tutorial-drod
Closed

18.0 tutorial drod#178
vandroogenbd wants to merge 9 commits into
odoo:18.0from
odoo-dev:18.0-tutorial-drod

Conversation

@vandroogenbd

Copy link
Copy Markdown

No description provided.

@proose proose left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Very very nice work ! You thought about (almost) every corner cases, well done !
You can quickly work on the different comments I sent you and squash your commits in one (only yours this time 😄 ).
Well done !

Comment thread estate/demo/estate_demo.xml
Comment thread estate/models/__init__.py
@@ -0,0 +1 @@
from . import estate_property_infos, estate_property, estate_property_offer, res_user

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Better to give each its own line: clearer and later, if some files have been added, people can find more easily who was at the origin of a specific file with a git blame



class Estate_Property(models.Model):
_name = "estate_property"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggested change
_name = "estate_property"
_name = "estate.property"

We use _ only in specific cases, in a model name. It is better to use a . in between words (you could think of it as the model "property" of the module "estate" -> estate.property).

This is the same for all other model names

active = False

name = fields.Char(required=True, string="Title")

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Avoid unnecessary empty lines between fields declarations, it takes a lot of space and doesn't bring much clarity :D

)

date_availability = fields.Date(
default=(date.today() + relativedelta(months=+3)),

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

You could also use fields.Date.today() + relativedelta(months=3) if you wanted, it would use one less import


color = fields.Integer(string="Colour")

property_estate_ids = fields.Many2many(

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This is unnecessary, we just want the tags on the properties, but we don't really care to find properties from a tag (a search by tags on the properties list view will suffice if we want to find properties with a special tag

<group>
<group>
<field name="type_id" attributes="{'can_write': false}"
options="{'no_create': true, 'no_open': true}" />

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Why those options and attribute ?

<field name="name">estate_property_kanban</field>
<field name="model">estate_property</field>
<field name="arch" type="xml">
<kanban class="o_kanban_mobile" default_group_by="type_id">

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Don't forget your kanban view shouldn't allow drag and drop

'name': '[TUTO] Estate_Account',
'summary': 'Module to invoice sold real estate properties',
'depends': [
'base_setup', 'estate', 'account'

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

'base_setup' here is not needed, as it is already a parent of 'account' which this module depends on ;)

'base_setup', 'estate', 'account'
],
'license': "LGPL-3",
'data': [

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

No need to add empty list in the manifest

[ADD] awesome_owl: Add ugly-ass boxes (Chapter 3)

[IMP] awesome_owl: Finish Chapter 4

I hate JavaScript
I hate JavaScript
I hate JavaScript
I hate JavaScript
I hate JavaScript
I hate JavaScript
I hate JavaScript
I hate JavaScript
I hate JavaScript
I hate JavaScript
I hate JavaScript
I hate JavaScript
I hate JavaScript
I hate JavaScript
I hate JavaScript
I hate JavaScript
I hate JavaScript
I hate JavaScript
I hate JavaScript
I hate JavaScript
I hate JavaScript
I hate JavaScript
I hate JavaScript
I hate JavaScript
I hate JavaScript
I hate JavaScript
I hate JavaScript

[IMP] awesome_owl: Finish Chapter 5

[IMP] awesome_owl: Finish Chapter 6
[IMP] awesome_owl: Finish Chapter 8

[IMP] awesome_owl: Finish Chapter 9

[IMP] awesome_owl: Finish Chapter 10
@vandroogenbd vandroogenbd deleted the 18.0-tutorial-drod branch December 15, 2025 10:01
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.

2 participants