Skip to content

Commit

Permalink
[IMP] estate,estate_acoount: minor changes for github error
Browse files Browse the repository at this point in the history
  • Loading branch information
nipl-odoo committed Jan 16, 2025
1 parent 4907827 commit 13455c5
Show file tree
Hide file tree
Showing 15 changed files with 21 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"python.analysis.typeCheckingMode": "standard",
"python.languageServer": "None"
}
}
2 changes: 1 addition & 1 deletion estate/controllers/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
from . import estate_website
from . import estate_website
10 changes: 9 additions & 1 deletion estate/controllers/estate_website.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,16 @@ def list_properties(self, page=1, **kwargs):
)
)

total_properties = request.env["estate.property"].sudo().search_count(
[
"&",
("status", "in", ["new", "offer_received", "offer_accepted"]),
("active", "=", True),
]
)

pager = request.website.pager(
url="/properties", total=len(properties), step=step, page=page
url="/properties", total=total_properties, step=step, page=page
)

# Render the template with paginated properties and the pager
Expand Down
2 changes: 1 addition & 1 deletion estate/data/estate.property.type.csv
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ id,name
property_1,Residential
property_2,Commercial
property_3,Industrial
property_4,Land
property_4,Land
2 changes: 1 addition & 1 deletion estate/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
from . import estate_property_type
from . import estate_property_tags
from . import estate_property_offer
from . import inherited_users
from . import inherited_users
2 changes: 1 addition & 1 deletion estate/models/inherited_users.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
class inheritedUser(models.Model):
_inherit = 'res.users'

property_ids=fields.One2many('estate.property', 'salesman_id',domain=[('status','not in',["sold","canceled"])])
property_ids=fields.One2many('estate.property', 'salesman_id',domain=[('status','not in',["sold","canceled"])])
2 changes: 1 addition & 1 deletion estate/security/ir.model.access.csv
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ access_estate_property_tags_manager,access_estate_property_tags_manager,model_es
access_estate_property_tags_user,access_estate_property_tags_user,model_estate_property_tags,estate.estate_group_user,1,0,0,0
access_estate_property_offer_manager,access_estate_property_offer_manager,model_estate_property_offer,estate.estate_group_manager,1,1,1,1
access_estate_property_offer_user,access_estate_property_offer_user,model_estate_property_offer,estate.estate_group_user,1,0,0,0
access_estate_property_make_offer,access_estate_property_make_offer_manager,model_estate_property_make_offer,estate.estate_group_manager,1,1,1,1
access_estate_property_make_offer,access_estate_property_make_offer_manager,model_estate_property_make_offer,estate.estate_group_manager,1,1,1,1
1 change: 0 additions & 1 deletion estate/views/estate_property_offer_views.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,3 @@
</field>
</record>
</odoo>

1 change: 0 additions & 1 deletion estate/views/estate_property_tags_views.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,3 @@
</record>

</odoo>

1 change: 0 additions & 1 deletion estate/views/estate_property_type_views.xml
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,3 @@
</field>
</record>
</odoo>

4 changes: 2 additions & 2 deletions estate/views/estate_property_views.xml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
<h1>
<field name="name" label="Property Name" placeholder="Property Name" />
</h1>
<field name="image" widget="image" options="{'size': [70, 70]}"/>
<field name="image" widget="image" options="{'size': [150, 150]}"/>

<field name="tag_ids" widget="many2many_tags" placeholder="eg. Cozy, Quiet, Furnished, ..." options="{'color_field': 'color'}"/>

Expand Down Expand Up @@ -172,4 +172,4 @@
<field name="state">code</field>
<field name="code">action=records.action_make_offer()</field>
</record>
</odoo>
</odoo>
2 changes: 1 addition & 1 deletion estate/views/res_users_views.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
</xpath>
</field>
</record>
</odoo>
</odoo>
2 changes: 1 addition & 1 deletion estate/wizard/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
from . import estate_property_make_offer
from . import estate_property_make_offer
2 changes: 1 addition & 1 deletion estate_account/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
from . import models
from . import models
2 changes: 1 addition & 1 deletion estate_account/models/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
from . import estate_property
from . import estate_property

0 comments on commit 13455c5

Please sign in to comment.