Skip to content

Commit e9ae1a9

Browse files
committed
[ADD] real_estate: add reports to real estate module
Implemented PDF reporting for estate properties with offer and property details. Created a reusable QWeb sub-template for the offer table to reduce duplication. Added logic to display a message when no offers exist on a property. Built a new report for salesmen (res.users) to list their properties and offers. Reused the sub-template in both reports for consistency and maintainability. Extended the property report in estate_account to show invoice info if sold. Improved report clarity, flexibility, and adherence to Odoo best practices.
1 parent e93d96c commit e9ae1a9

23 files changed

+152
-5
lines changed

estate_account/__manifest__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
'name': "Account",
33
'version': '1.0',
4-
'depends': ['base', 'estate_gasa', 'account'],
4+
'depends': ['base', 'real_estate', 'account'],
55
'author': "gasa",
66
'category': 'Category',
77
"license": "LGPL-3",

estate_account/models/estate.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ class Estate(models.Model):
66
_inherit = 'estate.property'
77

88
def action_mark_sold(self):
9-
self.check_access_rights('write')
10-
self.check_access_rule('write')
9+
self.check_access('write')
1110
res = super().action_mark_sold()
1211

1312
journal = self.env['account.journal'].sudo().search([('type', '=', 'sale')], limit=1)
File renamed without changes.

estate_gasa/__manifest__.py renamed to real_estate/__manifest__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@
1717
'views/estate_property_type_views.xml',
1818
'views/estate_tag_views.xml',
1919
'views/inherited_model.xml',
20-
'views/estate_menus.xml'
20+
'views/estate_menus.xml',
21+
'report/estate_property_offers_report_templates.xml',
22+
'report/estate_property_reports.xml'
2123
],
2224
"demo": [
2325
'demo/estate_property_demo_data.xml',

estate_gasa/data/estate.property.type.csv renamed to real_estate/data/estate.property.type.csv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ id,name
22
estate_property_type_residential,Residential
33
estate_property_type_commercial,Commercial
44
estate_property_type_industrial,Industrial
5-
estate_property_type_land,Land
5+
estate_property_type_land,Land
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)