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 Technical onboarding guja #359

Open
wants to merge 13 commits into
base: 18.0
Choose a base branch
from

Conversation

guja-odoo
Copy link

added init and manifest files

added init and manifest files
@robodoo
Copy link

robodoo commented Feb 17, 2025

Pull request status dashboard

Copy link

@clbr-odoo clbr-odoo left a comment

Choose a reason for hiding this comment

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

Good job so far, keep on ! 💪
I suggest you to configure your development environment to add the empty line at the end of your files automatically, it will save you time 🙂
You can also ask your IDE to trim useless whitespaces at the end of lines.

@@ -0,0 +1 @@
from . import models

Choose a reason for hiding this comment

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

Missing empty line at the end of all files 🙂

Choose a reason for hiding this comment

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

Like everywhere 😄

'demo': [
],
'application': True,
'installable': True

Choose a reason for hiding this comment

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

You'll need to add a license to get rid of the runbot warning and turn it to green 🙂

@@ -0,0 +1,23 @@
from odoo import fields, models

Choose a reason for hiding this comment

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

Two lines between the imports and the class.

from odoo import fields, models

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

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"

By convention, models _name use dots separators.

name = fields.Char(required=True)
description = fields.Text()
postcode = fields.Char()
date_availability = fields.Datetime()

Choose a reason for hiding this comment

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

Suggested change
date_availability = fields.Datetime()
date_availability = fields.Date()

Maybe a Date type is enough ? 🤔

Comment on lines 1 to 3
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.

Choose a reason for hiding this comment

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

No need for this anymore.

'name': "Real Estate",
'version': '1.0',
'depends': ['base'],
'author': "Author Name",

Choose a reason for hiding this comment

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

Suggested change
'author': "Author Name",
'author': "Odoo S.A.",

'author': "Author Name",
'category': 'Category',
'description': """
Description text

Choose a reason for hiding this comment

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

No need to do it in a new line.

Description text
""",
'website': 'https://www.odoo.com/page/estate',
# data files always loaded at installation

Choose a reason for hiding this comment

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

Those comments don't add any value 😬

Comment on lines 20 to 21


Choose a reason for hiding this comment

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

Extra space. We waste bits with that, think of the planet 😄

Comment on lines 24 to 25
'demo': [
],

Choose a reason for hiding this comment

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

No need.

name = fields.Char(required=True)
description = fields.Text()
postcode = fields.Char()
date_availability = fields.Datetime(copy=False, default=fields.Datetime.add(fields.Datetime.now(), months=+3))

Choose a reason for hiding this comment

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

We can inline this.

garden_area = fields.Integer()
garden_orientation = fields.Selection(
string='Orientation',
selection=[('north', 'North'), ('south', 'South'), ('east', 'East'), ('west', 'West')],

Choose a reason for hiding this comment

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

Suggested change
selection=[('north', 'North'), ('south', 'South'), ('east', 'East'), ('west', 'West')],
selection=[
('north', 'North'),
('south', 'South'),
('east', 'East'),
('west', 'West'),
],

Like this we can add new values without breaking the git history.

@@ -0,0 +1 @@
from . import models

Choose a reason for hiding this comment

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

Like everywhere 😄

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.

4 participants