Conversation
blse-odoo
left a comment
There was a problem hiding this comment.
It is a good start, congrats on your first PR!
I noticed you used very short commit messages, did you have a look at the git guidelines? Just to get familiar with the process, I think would be better to try to follow them a bit
- Deleting module 'chapter1_firstmodule' - Moving module 'chapter2_estate' to 'estate' as it will be used through all chapters
Fixing `estate_property_action` id error on module installation due to wrong order in `__manifest__.py`
|
I failed to reproduce the bug mentioned above (crash on refused offer). Let me know if it is still there or in which conditions it is happening... 🧐 |
|
I think it is fixed by 121e523#diff-8000c23a2907f34f0cc387be9dc4178411fda81b674724854bd4d048f9e11b16L50 |
| def _unlink_if_new_or_canceled(self): | ||
| for record in self: | ||
| if record.state not in ['new', 'canceled']: | ||
| raise exceptions.UserError('Cannot delete a property with offers or that is sold!') |
There was a problem hiding this comment.
I'm not sure what is causing the following error with these steps:
- Create a property and save it
- Add an offer and save
- Cancel the property
- Delete the property (confirm delete) → This causes an error
There was a problem hiding this comment.
Once an offer has been linked to a property, the property cannot be deleted (even is state=canceled) because of the forgein key constraint in the DB. I've added an error message in 72992f8 to avoid the crash. Another option is to delete the property AND the offer(s) linked to it
Add/customize the following wiews : - property list - property search - property form
'active' and 'garden_orientation' fields were not creating in the DB due to comma at end of line
Implementing new property related models : - Property type: M2O - Property tags: M2M - Property offers: O2M
- Property total area auto computed - Best offer selection - Offer validity & date auto update - Property garden onchange pre-filling - `partener_id` typo fix
Default value was set on server startup time, using a callable (lambda) set value on record creation.
- Set property as sold/cancel - Set offer as accepted/refused (only one accepted offer per property) - Set buyer and selling price when offer is accepted
- SQL constraints for positive property expected/selling price - SQL constraint for positive offer price - SQL constraints for unique tags/types names - Python constraint to check selling above 90% of expected price
Tuning our views [FIX] estate: tag color in views - Show tags color in property view - Show tags color field in list view
ce25143 to
bfa5035
Compare
| from odoo import models, fields | ||
|
|
||
| class EstateUser(models.Model): | ||
| _inherit = "res.users" |
There was a problem hiding this comment.
You can have a look at the other _inherit = "res.users" in odoo. You may want to adapt the code here to follow the naming convention for the file and the class ;)
- Property ondelete method - Offer creation method - Inherited user model and view [FIX] estate: renaming res.user subclass Renaming the user class inheriting from `res.user` to follow conventions
Don't allow to delete canceled propertis that recived offers. Otherwise forgein key constraint clash in DB
Add a new estate_account link module to trigger invoice creation when a property is marked as sold
Adding a kanban view for our properties
35461f8 to
e3aa5b0
Compare
Trying to match coding guidelines

Hi, first commit here!