diff --git a/estate/__manifest__.py b/estate/__manifest__.py index bcfb335ed0..1fd8a6a1e7 100644 --- a/estate/__manifest__.py +++ b/estate/__manifest__.py @@ -14,8 +14,11 @@ 'view/estate_property_type_view.xml', 'view/estate_property_tag_view.xml', 'view/res_users_view.xml', - 'view/estate_menus.xml' - + 'view/estate_menus.xml', + 'data/property_type.xml' + ], + 'demo': [ + 'demo/estate_property_demo.xml' ], 'installable': True, 'application': True, diff --git a/estate/data/property_type.xml b/estate/data/property_type.xml new file mode 100644 index 0000000000..c4d3fb8a10 --- /dev/null +++ b/estate/data/property_type.xml @@ -0,0 +1,15 @@ + + + + Residential + + + Commercial + + + Industrial + + + Land + + \ No newline at end of file diff --git a/estate/demo/estate_property_demo.xml b/estate/demo/estate_property_demo.xml new file mode 100644 index 0000000000..11344f3257 --- /dev/null +++ b/estate/demo/estate_property_demo.xml @@ -0,0 +1,31 @@ + + + Big Villa + new + A nice and big villa + 12345 + 2020-02-02 + 1600000 + 6 + 100 + 4 + True + True + 100000 + south + + + + Trailer home + canceled + Home in a trailer park + 54321 + 1970-01-01 + 100000 + 100000 + 1 + 10 + 4 + False + + diff --git a/estate/models/estate_property_offer.py b/estate/models/estate_property_offer.py index 9a486c4143..bb57869a28 100644 --- a/estate/models/estate_property_offer.py +++ b/estate/models/estate_property_offer.py @@ -72,5 +72,5 @@ def create(self, vals): max_amount = max(existing_offers.mapped('price')) if price < max_amount: raise UserError( - "The offer amount cannot be lower than an existing offer.") + f"The offer amount cannot be lower than an existing offer {max_amount}") return super().create(vals) diff --git a/estate/wizard/estate_add_offer_wizard.py b/estate/wizard/estate_add_offer_wizard.py index ee933ddae2..c269bdcc5b 100644 --- a/estate/wizard/estate_add_offer_wizard.py +++ b/estate/wizard/estate_add_offer_wizard.py @@ -10,7 +10,7 @@ class EstateAddOfferWizard(models.TransientModel): offer_status = fields.Selection(string='Offer Status', selection=[ ('accepted', 'Accepted'), - ('rejected', 'Rejected') + ('refused', 'Refused') ]) buyer = fields.Many2one('res.partner', string='Buyer') diff --git a/estate/wizard/estate_add_offer_wizard_view.xml b/estate/wizard/estate_add_offer_wizard_view.xml index aa77b86ad3..fe2928ad04 100644 --- a/estate/wizard/estate_add_offer_wizard_view.xml +++ b/estate/wizard/estate_add_offer_wizard_view.xml @@ -1,13 +1,5 @@ - - Estate Add Offer Wizard - estate.add.offer.wizard - form - - new - - estate.add.offer.wizard.form estate.add.offer.wizard @@ -28,4 +20,12 @@ + + + Estate Add Offer Wizard + estate.add.offer.wizard + form + + new + \ No newline at end of file