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 training aele #232

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

Conversation

AhmedElemary57
Copy link

I have completed the training CH 1, 2, 3, 4

@robodoo
Copy link

robodoo commented Jan 21, 2025

Pull request status dashboard

_order = "sequence"

name = fields.Char('Name', required=True, translate=True)
description = fields.Text("Description", required=False)

Choose a reason for hiding this comment

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

required=False is true by default

@ethanrobv
Copy link

Note the CI/Style check is failing

sequence = fields.Integer()
# Relations
property_ids = fields.One2many(comodel_name='estate.property', inverse_name='property_type_id')
offer_ids = fields.One2many(comodel_name='estate.property.offer', inverse_name='property_type_id')

Choose a reason for hiding this comment

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

There is no field 'property_type_id' in model 'estate.property.offer'

{
'name': "Real Estate",
'version': '1.0',
'depends': ['base', 'mail'],

Choose a reason for hiding this comment

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

why are you depending on mail?!!

class EstateProperty(models.Model):
_name = "estate.property"
_description = "Property data model"
_inherit = ['mail.thread']

Choose a reason for hiding this comment

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

Why are you inheriting from mail.threads?

Comment on lines 39 to 43
selection=[('n', 'North'),
('s', 'South'),
('e', 'East'),
('w', 'West'),
],

Choose a reason for hiding this comment

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

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

what you did is not wrong but this is the name that will be used in the database so it's better to be more that one character

@nesma-neha
Copy link

Kindly ensure that you follow the commit message structure outlined in the Odoo documentation: Git Guidelines.
https://www.odoo.com/documentation/18.0/contributing/development/git_guidelines.html

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