-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
[ADD] created a new module, model definition,added security file,crea… #322
base: 18.0
Are you sure you want to change the base?
Conversation
…ted action and menuitems, created custom list view
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 @jodh-odoo ,
I've added some suggestions. Please have a look at them.
Please make sure to add a new line at the end of every file.
estate/models/estate_property.py
Outdated
default="new", | ||
selection=[('new', 'New'), ('offerreceived', 'Offer Received'), ('offeraccepted', 'Offer Accepted'), ('sold', 'Sold'), ('cancelled', 'Cancelled')] | ||
) | ||
active=fields.Boolean(default=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.
No new line at EOF
Check other occurences also.
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.
checked all the occurences and add a new line at EOF.
estate/__manifest__.py
Outdated
@@ -0,0 +1,13 @@ | |||
{ | |||
'name':'Real Estate', | |||
'version':'0.0.0', |
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.
'version':'0.0.0', | |
'version':'1.0', |
please add correct version for module.
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.
Suggested changes are done.
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.
Check the proper sequencing for fields in manifest file.
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.
Checked the proper sequencing and done changes accordingly.
estate/models/estate_property.py
Outdated
name=fields.Char(required=True,default="Unknown") | ||
description=fields.Text() | ||
postcode=fields.Char() | ||
date_availability=fields.Date(copy=False,default=fields.Date.today()+timedelta(days=+90)) |
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.
date_availability=fields.Date(copy=False,default=fields.Date.today()+timedelta(days=+90)) | |
date_availability = fields.Date(copy=False, default=fields.Date.today() + timedelta(days=90)) |
Please ensure the entire module follows coding guidelines by adding spaces wherever necessary.
Could you explain the purpose of "copy", "required", "readonly" parameters?
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.
copy is used to make sure that while duplicating a record the field where copy is used does not gets copied,
required is used to make the field not null, and read only parameter prevents the alteration of the field.
estate/models/estate_property.py
Outdated
_description="test description" | ||
|
||
|
||
name=fields.Char(required=True,default="Unknown") |
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.
name=fields.Char(required=True,default="Unknown") | |
name = fields.Char(required=True, default="Unknown") |
General comment to keep in mind from next time:
Please ensure the entire module follows coding guidelines by adding spaces wherever necessary.
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.
ensured the coding guidelines are followed according to your suggestion.
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.
Why there is need of new file for adding views?
Can't we add the views in its appropriate file (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.
added the views in their appropriate files.
<field name="res_model">estate.property</field> | ||
<field name="view_mode">list,form</field> | ||
</record> | ||
|
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.
Why there is extra line here? Please remove the extra line.
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.
Suggested changes are done.
…d cutom form view and search view, seperated files for menuitems and views,actions.
…ted action and menuitems, created custom list view