Skip to content

Commit

Permalink
[16.0][ADD] real_estate: Remove strings from field declaration
Browse files Browse the repository at this point in the history
  • Loading branch information
RonnyBinhexTeam committed May 23, 2024
1 parent f0d611b commit ac09816
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 15 deletions.
5 changes: 2 additions & 3 deletions real_estate/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Real Estate
===========

..
..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
Expand Down Expand Up @@ -61,8 +61,7 @@ Authors
Contributors
~~~~~~~~~~~~

* `Binhex <https://binhex.cloud>`_:

* Denis Roussel <denis.roussel@acsone.eu>

Maintainers
~~~~~~~~~~~
Expand Down
2 changes: 1 addition & 1 deletion real_estate/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"version": "16.0.1.0.0",
"license": "AGPL-3",
"development_status": "Alpha",
"author": "ACSONE SA/NV,Odoo Community Association (OCA) Binhex Solutions",
"author": "Binhex, " "Odoo Community Association (OCA)",
"website": "https://github.com/OCA/vertical-realestate",
"depends": ["base", "mail", "contacts"],
"data": [
Expand Down
17 changes: 7 additions & 10 deletions real_estate/models/real_estate.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,12 @@ class RealEstate(models.Model):
)
active = fields.Boolean(default=True)
image = fields.Image(
string="Image",
max_width=256,
max_height=256,
help="This field holds the image used for the real estate",
)
ref = fields.Char(
default=lambda self: self.env["ir.sequence"].next_by_code("real.estate"),
string="Reference",
index=True,
copy=False,
readonly=True,
Expand All @@ -46,22 +44,21 @@ class RealEstate(models.Model):
city = fields.Char()
state_id = fields.Many2one(
"res.country.state",
string="State",
ondelete="restrict",
domain="[('country_id', '=?', country_id)]",
)
country_id = fields.Many2one("res.country", string="Country", ondelete="restrict")
country_code = fields.Char(related="country_id.code", string="Country Code")
real_estate_latitude = fields.Float(string="Geo Latitude", digits=(10, 7))
real_estate_longitude = fields.Float(string="Geo Longitude", digits=(10, 7))
comment = fields.Html(string="Notes")
country_id = fields.Many2one("res.country", ondelete="restrict")
country_code = fields.Char(
related="country_id.code",
)
real_estate_latitude = fields.Float(digits=(10, 7))
real_estate_longitude = fields.Float(digits=(10, 7))
comment = fields.Html()
owner_ids = fields.Many2many(
"res.partner",
string="Owners",
)
company_id = fields.Many2one(
comodel_name="res.company",
string="Company",
default=lambda self: self.env.company.id,
help="The default company for this user.",
)
2 changes: 1 addition & 1 deletion real_estate/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ <h1><a class="toc-backref" href="#toc-entry-2">Credits</a></h1>
<div class="section" id="authors">
<h2><a class="toc-backref" href="#toc-entry-3">Authors</a></h2>
<ul class="simple">
<li>ACSONE SA/NV</li>
<li>Binhex</li>
</ul>
</div>
<div class="section" id="contributors">
Expand Down

0 comments on commit ac09816

Please sign in to comment.