-
-
Notifications
You must be signed in to change notification settings - Fork 26
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
[16.0][ADD] real_estate: Addon to manage real estate #17
base: 16.0
Are you sure you want to change the base?
Conversation
What I wanted on the first version is to inherit from all properties of res.partner(and even added ones). As an estate has all properties of addresses. This approach has a drawback is the implementation it needs. But IMHO, the advantages have more pro than cons. I'm not too much in favor of these changes |
I understand your point, but one of the problems, which arose when trying to use the currently published version, is that the fields of res.partner many2one list the contacts and also the properties, which forces us to add unnecessary domains so as not to list the properties . |
I agree it should be an isolated one with the needed m2o, or maybe fields sync. |
@rousseldenis So, would it be possible to validate the PR, with the new approach? |
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.
Hi all,
for a project I'm working on (16.0) I need the management of estate.
My needs are very basic at the moment so I could create my custom module, but if it possible to use an OCA one I am happier.
For what I can understand from the comments and the code, this version is "better" than the 13.0.
So if it is possible to update the commit to have a runboat to test I will do it.
Thanks
@jelenapoblet is this PR, the other PR it's closed |
Got it @curonny , thank you! Is there anything else we can do to move this forward? |
everything is done, waiting for approval |
@curonny Could you provide migration scripts if needed ? |
real_estate/models/real_estate.py
Outdated
real_estate_latitude = fields.Float(digits=(10, 7)) | ||
real_estate_longitude = fields.Float(digits=(10, 7)) | ||
comment = fields.Html() | ||
owner_ids = fields.Many2many( |
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.
This could be enhanced in order to support different kind of property (bare ownership, ....).
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.
Not sure if Im catching the idea. Right now we can assign rental estate type and if some filter is needed at contact level you could set it up in some MISC field.
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.
The owner field relation is maybe too generic.
As there are several kind of (legal) ownerhsip on a property (bare ownership, usufruct, ...)
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.
I created a middle model to handle those cases and added some ownerhsip type examples I found.
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.
The owner field relation is maybe too generic.
As there are several kind of (legal) ownerhsip on a property (bare ownership, usufruct, ...)
... payer for taxes who can be someone else than the owner...
More complicated case : one payer for rubbish tax and another one for water tax
So maybe add some selection field with kind of relation with the estate... how about keeping inheritage on res.partner and integrating partner_multi_relation ?
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 not using partner_multi_relation to have any kind of relation between real_estate and res_partner ? let's discuss that here
real_estate/models/real_estate.py
Outdated
country_code = fields.Char( | ||
related="country_id.code", | ||
) | ||
real_estate_latitude = fields.Float(digits=(10, 7)) |
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.
We are in the real estate model, so removing real_estate
should be great for both fields
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.
I removed those fields, maybe we can add it in the future with some geolocation feature
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.
@Christian-RB I think Denis means 'remove real_estate from the name of the field' not 'remove the field'
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.
I removed the fields since they were not being displayed at all
@curonny Could you rebase ? |
real_estate/models/real_estate.py
Outdated
index=True, | ||
) | ||
active = fields.Boolean(default=True) | ||
image = fields.Image( |
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 don't you use theimage.mixin
present in v16 in order to manage all sizes ?
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.
Done, thanks for the tip
9e719b7
to
906ae2b
Compare
Hi, @rousseldenis I will continue @curonny's work here, sorry for the delay. I have already applied some changes following your comments and I'm checking the migration scripts right now. Thanks in advance. |
906ae2b
to
8efbd75
Compare
8efbd75
to
7ae8a43
Compare
Hello After doing some research, we see that there are different approaches to manage real estates
I don't know which is the best but I think account.analytic.account must be considered Also, is there a chance for every approach to converge to a unique OCA's approach ? |
cc @max3903 |
cc @vehi-invitu |
@cvinh Hi Cyril, indeed, I started the modules stack few years ago and have an instance running in v13. A discussion on this can be done here or in a separate issue. In fact, I've implemented analytic too. You can create an issue, I will try to get in touch with updates as I've been busy for months on other topics. |
I also think that property should be a separated entity, and then connected to whatever you want (partner, analytic, product...), like for example projects auto-create analytic accounts on creation. |
Well do you think pms and vertical-estate can converge somehow ? |
Yeah, both may have the same base property definition. |
What's your vision achieving this ? Another repo ?, take pms as basis and inherit it for vertical-* ? |
You can have the base module in OCA/pms, and inherit here. |
We can do that but in a new module as pms one is very big. |
Yeah, I was talking just about the repository host. The module may be |
I agree with the approach. Creating a lightweight base_property module that inherits from OCA/pms is a smart solution. @Christian-RB |
I believe I understand the approach. The idea would be as follows:
Let me know if I am right |
I'm opening a new issue in pms repo to discuss about the common fields to have in base_property module |
FYI |
No description provided.