-
Notifications
You must be signed in to change notification settings - Fork 754
Technical Training - Kenneth #71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
KennethOfficial
wants to merge
59
commits into
odoo:master
Choose a base branch
from
KennethOfficial:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
59 commits
Select commit
Hold shift + click to select a range
8b6a081
Remove estate/models.py file as part of project restructuring.
KennethOfficial 89b5a43
Update version number in __manifest__.py from 16.0.0 to 18.0.1.0.1
KennethOfficial e4f81a5
Update version number to 18.0.1.0.2 and add fields to EstateProperty …
KennethOfficial 3519c09
Add security access rules by including 'security/ir.model.access.csv'…
KennethOfficial e3c918c
Update version number to 18.0.1.0.3 in __manifest__.py for the estate…
KennethOfficial cbe9c14
Update version number to 18.0.1.0.4 and add 'views/estate_property_vi…
KennethOfficial 303b185
Add initial XML structure for estate_property_views.xml file in the e…
KennethOfficial 147cd2e
Update version number to 18.0.1.0.6 in __manifest__.py and add estate…
KennethOfficial e2e36c6
Update version number to 18.0.1.0.7 in __manifest__.py and change mod…
KennethOfficial e6a74de
Update version number to 18.0.1.0.8 in __manifest__.py and add 'views…
KennethOfficial 7dbed06
Update estate_property.py to set 'copy=False' for date_availability a…
KennethOfficial 950045a
Update version number to 18.0.1.0.10 in __manifest__.py and set defau…
KennethOfficial 28c2e6d
Add 'active' field to EstateProperty model and update view mode in es…
KennethOfficial e236589
Add 'state' field to EstateProperty model with selection options for …
KennethOfficial aef1496
Update version number to 18.0.1.0.13 in __manifest__.py, reorder data…
KennethOfficial a4d8c7f
Refactor EstateProperty model initialization to use _auto_init method…
KennethOfficial b930a24
Remove deprecated logging and XML view definitions from EstatePropert…
KennethOfficial af47b94
new
KennethOfficial 1a9b8c0
Update version number to 18.0.1.0.17 in __manifest__.py and rename ac…
KennethOfficial 864efc1
Enhance estate_property_views.xml by adding a detailed list view defi…
KennethOfficial 8b5a3de
Update version number to 18.0.1.0.18 in __manifest__.py for the Estat…
KennethOfficial 37d4d6a
Update version number to 18.0.1.0.19 in __manifest__.py and add a new…
KennethOfficial 8d01890
Add search view definition for estate properties in estate_property_v…
KennethOfficial 01de875
Update version number to 18.0.1.0.21 in __manifest__.py and remove th…
KennethOfficial 71d2909
Update version number to 18.0.1.0.22 in __manifest__.py and remove re…
KennethOfficial b76bf7b
Update version number to 18.0.1.0.23 in __manifest__.py and comment o…
KennethOfficial 7edb097
Uncomment view definitions in estate_property_views.xml to restore fo…
KennethOfficial 7f4b01f
Add view ID and search view ID references in estate_property_views.xm…
KennethOfficial b310dd7
Update version number to 18.0.1.0.25 in __manifest__.py, add property…
KennethOfficial c8a0159
Update version number to 18.0.1.0.26 in __manifest__.py, add salesper…
KennethOfficial 82f412a
Update version number to 18.0.1.0.27 in __manifest__.py, add tag_ids …
KennethOfficial cac6e32
Update version number to 18.0.1.0.28 in __manifest__.py, add offer_id…
KennethOfficial 04010fd
Enhance EstatePropertyOffer and EstateProperty models with validity a…
KennethOfficial a2ab98a
Update version number to 18.0.1.0.30 in __manifest__.py and add oncha…
KennethOfficial 4aa0c48
Update version number to 18.0.1.0.31 in __manifest__.py, implement ac…
KennethOfficial 5ef1e7e
Update version number to 18.0.1.0.32 in __manifest__.py and add SQL c…
KennethOfficial 2456615
Update version number to 18.0.1.0.33 in __manifest__.py and refactor …
KennethOfficial 2fe6008
Refactor SQL constraints in EstatePropertyOffer, EstatePropertyTag, E…
KennethOfficial 6fd7240
Update version number to 18.0.1.0.35 in __manifest__.py and add valid…
KennethOfficial 053ca5e
Add property_ids relationship to EstatePropertyType model and enhance…
KennethOfficial 2814a8f
Update version number to 18.0.1.0.37 in __manifest__.py and add order…
KennethOfficial 1b90e46
Enhance EstatePropertyType model by adding a sequence field for order…
KennethOfficial d42d7fe
Update version number to 18.0.1.0.38 in __manifest__.py, add color fi…
KennethOfficial 0cf2057
Update version number to 18.0.1.0.39 in __manifest__.py, make propert…
KennethOfficial 02359f3
Enhance estate property views by adding conditional decorations for o…
KennethOfficial c002789
Add property_type_id field to EstatePropertyOffer model, enhance Esta…
KennethOfficial 603d821
Refactor estate property views by commenting out unused button elemen…
KennethOfficial 6a43192
Reorganize estate property views by moving the action window definiti…
KennethOfficial 61864b4
Refactor estate property views by reintroducing the action window def…
KennethOfficial 92003f6
Comment out the button box in estate_property_type_views.xml to tempo…
KennethOfficial 2770cce
Update version number to 18.0.1.0.46 in __manifest__.py, reintroduce …
KennethOfficial 10cccda
Add CRUD method overrides in EstatePropertyOffer and EstateProperty m…
KennethOfficial f594dbd
Update version number to 18.0.1.0.48 in __manifest__.py and add res_u…
KennethOfficial b45e63e
Refactor create method in EstatePropertyOffer to support batch creati…
KennethOfficial 52b9c8b
Enhance EstatePropertyOffer model by adding validation for batch crea…
KennethOfficial 9cf95e1
Update __manifest__.py to include security access file and modify __i…
KennethOfficial 948d034
Import estate_property model in __init__.py to enhance module structu…
KennethOfficial f093f9c
Implement invoice creation in action_sold method of EstateProperty mo…
KennethOfficial 76a685c
Add Kanban view for estate properties and update action window view m…
KennethOfficial File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,11 +1,18 @@ | ||
| { | ||
| "name": "Estate", # The name that will appear in the App list | ||
| "version": "16.0.0", # Version | ||
| "version": "18.0.1.0.49", # Version | ||
| "application": True, # This line says the module is an App, and not a module | ||
| "depends": ["base"], # dependencies | ||
| "data": [ | ||
|
|
||
| 'data': [ | ||
| 'security/ir.model.access.csv', | ||
| 'views/estate_property_views.xml', | ||
| 'views/estate_property_offer_views.xml', | ||
| 'views/estate_property_type_views.xml', | ||
| 'views/estate_property_tag_views.xml', | ||
| 'views/res_users_views.xml', | ||
| 'views/estate_menus.xml', | ||
| ], | ||
|
|
||
| "installable": True, | ||
| 'license': 'LGPL-3', | ||
| } |
Empty file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| from . import estate_property | ||
| from . import estate_property_type | ||
| from . import estate_property_tag | ||
| from . import estate_property_offer | ||
| from . import res_users | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,123 @@ | ||||||
| from odoo import models, fields, api | ||||||
| from odoo.exceptions import UserError, ValidationError | ||||||
| from odoo.tools.float_utils import float_compare, float_is_zero | ||||||
|
|
||||||
| class EstateProperty(models.Model): | ||||||
| _name = "estate.property" | ||||||
| _description = "Real Estate Property" | ||||||
| _order = "id desc" | ||||||
|
|
||||||
| _sql_constraints = [ | ||||||
| ('check_expected_price', 'CHECK(expected_price > 0)', 'Expected price must be strictly positive'), | ||||||
| ('check_selling_price', 'CHECK(selling_price >= 0)', 'Selling price must be positive'), | ||||||
| ] | ||||||
|
|
||||||
| # Basic Information | ||||||
| name = fields.Char(required=True) | ||||||
| description = fields.Text() | ||||||
| postcode = fields.Char() | ||||||
| date_availability = fields.Date(copy=False, default=lambda self: fields.Date.add(fields.Date.today(), months=2)) | ||||||
| active = fields.Boolean(default=True) | ||||||
| state = fields.Selection( | ||||||
| selection=[ | ||||||
| ('new', 'New'), | ||||||
| ('offer_received', 'Offer Received'), | ||||||
| ('offer_accepted', 'Offer Accepted'), | ||||||
| ('sold', 'Sold'), | ||||||
| ('cancelled', 'Cancelled'), | ||||||
| ], default='new') | ||||||
| property_type_id = fields.Many2one("estate.property.type", string="Property Type") | ||||||
| # Pricing | ||||||
| expected_price = fields.Float(required=True) | ||||||
| selling_price = fields.Float(readonly=True, copy=False) | ||||||
| best_price = fields.Float(compute='_compute_best_price', string='Best Offer') | ||||||
|
|
||||||
| # Property Details | ||||||
| bedrooms = fields.Integer(default=2) | ||||||
| living_area = fields.Integer() | ||||||
| facades = fields.Integer() | ||||||
| total_area = fields.Integer(compute='_compute_total_area', string='Total Area') | ||||||
|
|
||||||
| # Features | ||||||
| garage = fields.Boolean() | ||||||
| garden = fields.Boolean() | ||||||
| garden_area = fields.Integer() | ||||||
| garden_orientation = fields.Selection( | ||||||
| selection=[ | ||||||
| ('north', 'North'), | ||||||
| ('south', 'South'), | ||||||
| ('east', 'East'), | ||||||
| ('west', 'West'), | ||||||
| ] | ||||||
| ) | ||||||
|
|
||||||
| # People | ||||||
| salesperson_id = fields.Many2one('res.users', string='Salesperson', default=lambda self: self.env.user) | ||||||
| buyer_id = fields.Many2one('res.partner', string='Buyer', copy=False) | ||||||
|
|
||||||
| # Tags | ||||||
| tag_ids = fields.Many2many('estate.property.tag', string='Tags') | ||||||
|
|
||||||
| # Offers | ||||||
| offer_ids = fields.One2many('estate.property.offer', 'property_id', string='Offers') | ||||||
|
|
||||||
| # Computed Methods | ||||||
| @api.depends('living_area', 'garden_area') | ||||||
| def _compute_total_area(self): | ||||||
| for record in self: | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
We tend to use a variable that reflects the model were are in |
||||||
| record.total_area = record.living_area + record.garden_area | ||||||
|
|
||||||
| @api.depends('offer_ids.price') | ||||||
| def _compute_best_price(self): | ||||||
| for record in self: | ||||||
| prices = record.offer_ids.mapped('price') | ||||||
| record.best_price = max(prices) if prices else 0.0 | ||||||
|
|
||||||
| # Onchange Methods | ||||||
| @api.onchange('garden') | ||||||
| def _onchange_garden(self): | ||||||
| if self.garden: | ||||||
| self.garden_area = 10 | ||||||
| self.garden_orientation = 'north' | ||||||
| else: | ||||||
| self.garden_area = 0 | ||||||
| self.garden_orientation = False | ||||||
|
|
||||||
| # Button Action Methods (Public - no underscore prefix) | ||||||
| def action_cancel(self): | ||||||
| for record in self: | ||||||
| if record.state == 'sold': | ||||||
| raise UserError("Cannot cancel a sold property") | ||||||
| record.state = 'cancelled' | ||||||
| return True | ||||||
|
|
||||||
| def action_sold(self): | ||||||
| for record in self: | ||||||
| if record.state == 'cancelled': | ||||||
| raise UserError("Cannot sell a cancelled property") | ||||||
| record.state = 'sold' | ||||||
| return True | ||||||
|
|
||||||
| # Python Constraints | ||||||
| @api.constrains('selling_price', 'expected_price') | ||||||
| def _check_selling_price(self): | ||||||
| for record in self: | ||||||
| # Skip validation if selling price is zero (not yet sold) | ||||||
| if float_is_zero(record.selling_price, precision_digits=2): | ||||||
| continue | ||||||
|
|
||||||
| # Calculate 90% of expected price | ||||||
| min_selling_price = record.expected_price * 0.9 | ||||||
|
|
||||||
| # Compare selling price with minimum allowed (90% of expected) | ||||||
| if float_compare(record.selling_price, min_selling_price, precision_digits=2) < 0: | ||||||
| raise ValidationError( | ||||||
| f"Selling price ({record.selling_price:.2f}) cannot be lower than 90% of expected price ({min_selling_price:.2f})" | ||||||
| ) | ||||||
|
|
||||||
| # CRUD Method Overrides | ||||||
| @api.ondelete(at_uninstall=False) | ||||||
| def _check_property_deletion(self): | ||||||
| for record in self: | ||||||
| if record.state not in ['new', 'cancelled']: | ||||||
| raise UserError(f"Cannot delete property '{record.name}' because it is in '{record.state}' state. Only 'New' or 'Cancelled' properties can be deleted.") | ||||||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,97 @@ | ||
| from odoo import models, fields, api | ||
| from datetime import timedelta | ||
| from odoo.exceptions import UserError | ||
|
|
||
| class EstatePropertyOffer(models.Model): | ||
| _name = "estate.property.offer" | ||
| _description = "Real Estate Property Offer" | ||
| _order = "price desc" | ||
|
|
||
| _sql_constraints = [ | ||
| ('check_offer_price', 'CHECK(price > 0)', 'Offer price must be strictly positive'), | ||
| ] | ||
|
|
||
| # Basic Information | ||
| price = fields.Float() | ||
| status = fields.Selection( | ||
| selection=[ | ||
| ('accepted', 'Accepted'), | ||
| ('refused', 'Refused'), | ||
| ], copy=False) | ||
| validity = fields.Integer(default=7, string='Validity (days)') | ||
| date_deadline = fields.Date(compute='_compute_date_deadline', inverse='_inverse_date_deadline', string='Deadline') | ||
|
|
||
| # Relationships | ||
| partner_id = fields.Many2one('res.partner', string='Partner', required=True) | ||
| property_id = fields.Many2one('estate.property', string='Property', required=True) | ||
| property_type_id = fields.Many2one('estate.property.type', related='property_id.property_type_id', string='Property Type', store=True) | ||
|
|
||
| # Computed Methods | ||
| @api.depends('create_date', 'validity') | ||
| def _compute_date_deadline(self): | ||
| for record in self: | ||
| # Use create_date if available, otherwise use today as fallback | ||
| base_date = record.create_date.date() if record.create_date else fields.Date.today() | ||
| record.date_deadline = base_date + timedelta(days=record.validity) | ||
|
|
||
| def _inverse_date_deadline(self): | ||
| for record in self: | ||
| if record.date_deadline and record.create_date: | ||
| # Calculate validity based on deadline and create_date | ||
| base_date = record.create_date.date() | ||
| delta = record.date_deadline - base_date | ||
| record.validity = delta.days | ||
| elif record.date_deadline: | ||
| # If no create_date, use today as fallback | ||
| today = fields.Date.today() | ||
| delta = record.date_deadline - today | ||
| record.validity = delta.days | ||
|
|
||
| # Button Action Methods (Public - no underscore prefix) | ||
| def action_accept(self): | ||
| for record in self: | ||
| # Refuse all other offers for this property first | ||
| other_offers = record.property_id.offer_ids.filtered(lambda o: o.id != record.id) | ||
| other_offers.write({'status': 'refused'}) | ||
|
|
||
| # Accept this offer | ||
| record.status = 'accepted' | ||
|
|
||
| # Set buyer and selling price on the property | ||
| record.property_id.buyer_id = record.partner_id | ||
| record.property_id.selling_price = record.price | ||
| return True | ||
|
|
||
| def action_refuse(self): | ||
| for record in self: | ||
| record.status = 'refused' | ||
| return True | ||
|
|
||
| # CRUD Method Overrides | ||
| @api.model_create_multi | ||
| def create(self, vals_list): | ||
| # Handle both single record and batch creation | ||
| if not isinstance(vals_list, list): | ||
| vals_list = [vals_list] | ||
|
|
||
| # Process each record in the batch | ||
| for vals in vals_list: | ||
| # Get the property record | ||
| property_id = vals.get('property_id') | ||
| if property_id: | ||
| property_record = self.env['estate.property'].browse(property_id) | ||
|
|
||
| # Check if offer price is higher than existing offers | ||
| existing_offers = property_record.offer_ids | ||
| if existing_offers: | ||
| max_existing_price = max(existing_offers.mapped('price')) | ||
| if vals.get('price', 0) <= max_existing_price: | ||
| raise UserError(f"Offer price must be higher than existing offers. Current highest offer: {max_existing_price}") | ||
|
|
||
| # Set property state to 'Offer Received' | ||
| property_record.state = 'offer_received' | ||
|
|
||
| # Always call super() to maintain the flow | ||
| return super().create(vals_list) | ||
|
|
||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| from odoo import models, fields | ||
|
|
||
| class EstatePropertyTag(models.Model): | ||
| _name = "estate.property.tag" | ||
| _description = "Real Estate Property Tag" | ||
| _order = "name" | ||
|
|
||
| _sql_constraints = [ | ||
| ('check_name_unique', 'UNIQUE(name)', 'Property tag name must be unique'), | ||
| ] | ||
|
|
||
| # Basic Information | ||
| name = fields.Char(required=True) | ||
| color = fields.Integer() | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| from odoo import models, fields, api | ||
|
|
||
| class EstatePropertyType(models.Model): | ||
| _name = "estate.property.type" | ||
| _description = "Real Estate Property Type" | ||
| _order = "sequence, name" | ||
|
|
||
| _sql_constraints = [ | ||
| ('check_name_unique', 'UNIQUE(name)', 'Property type name must be unique'), | ||
| ] | ||
|
|
||
| # Basic Information | ||
| sequence = fields.Integer(default=10) | ||
| name = fields.Char(required=True) | ||
|
|
||
| # Relationships | ||
| property_ids = fields.One2many('estate.property', 'property_type_id', string='Properties') | ||
| offer_ids = fields.One2many('estate.property.offer', 'property_type_id', string='Offers') | ||
| offer_count = fields.Integer(compute='_compute_offer_count', string='Offers Count') | ||
|
|
||
| # Computed Methods | ||
| @api.depends('offer_ids') | ||
| def _compute_offer_count(self): | ||
| for record in self: | ||
| record.offer_count = len(record.offer_ids) | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| from odoo import fields, models | ||
|
|
||
| class ResUsers(models.Model): | ||
| _inherit = "res.users" | ||
|
|
||
| property_ids = fields.One2many('estate.property', 'salesperson_id', string='Properties', domain=[('state', 'in', ['new', 'offer_received'])]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| id,name,model_id/id,group_id/id,perm_read,perm_write,perm_create,perm_unlink | ||
| access_estate_property_user,access_estate_property_user,model_estate_property,base.group_user,1,1,1,1 | ||
| access_estate_property_type_user,access_estate_property_type_user,model_estate_property_type,base.group_user,1,1,1,1 | ||
| access_estate_property_tag_user,access_estate_property_tag_user,model_estate_property_tag,base.group_user,1,1,1,1 | ||
| access_estate_property_offer_user,access_estate_property_offer_user,model_estate_property_offer,base.group_user,1,1,1,1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| <?xml version="1.0"?> | ||
| <odoo> | ||
| <menuitem id="estate_menu_root" name="Real Estate"> | ||
| <menuitem id="estate_first_level_menu" name="Advertisements"> | ||
| <menuitem id="estate_property_menu_action" action="estate_property_action"/> | ||
| </menuitem> | ||
| <menuitem id="estate_settings_menu" name="Settings"> | ||
| <menuitem id="estate_property_type_menu_action" action="estate_property_type_action"/> | ||
| <menuitem id="estate_property_tag_menu_action" action="estate_property_tag_action"/> | ||
| </menuitem> | ||
| </menuitem> | ||
| </odoo> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| <?xml version="1.0"?> | ||
| <odoo> | ||
| <!-- List View Definition --> | ||
| <record id="estate_property_offer_view_list" model="ir.ui.view"> | ||
| <field name="name">estate.property.offer.list</field> | ||
| <field name="model">estate.property.offer</field> | ||
| <field name="arch" type="xml"> | ||
| <list string="Property Offers" editable="bottom" decoration-danger="status == 'refused'" decoration-success="status == 'accepted'"> | ||
| <field name="price"/> | ||
| <field name="partner_id"/> | ||
| <field name="property_type_id"/> | ||
| <field name="validity"/> | ||
| <field name="date_deadline"/> | ||
| <field name="status" column_invisible="True"/> | ||
| </list> | ||
| </field> | ||
| </record> | ||
|
|
||
| <!-- Form View Definition --> | ||
| <record id="estate_property_offer_view_form" model="ir.ui.view"> | ||
| <field name="name">estate.property.offer.form</field> | ||
| <field name="model">estate.property.offer</field> | ||
| <field name="arch" type="xml"> | ||
| <form string="Property Offer"> | ||
| <header> | ||
| <button name="action_accept" string="Accept" type="object" icon="fa-check" invisible="status in ['accepted', 'refused']"/> | ||
| <button name="action_refuse" string="Refuse" type="object" icon="fa-times" invisible="status in ['accepted', 'refused']"/> | ||
| </header> | ||
| <sheet> | ||
| <group> | ||
| <field name="price"/> | ||
| <field name="partner_id"/> | ||
| <field name="validity"/> | ||
| <field name="date_deadline"/> | ||
| <field name="status"/> | ||
| </group> | ||
| </sheet> | ||
| </form> | ||
| </field> | ||
| </record> | ||
|
|
||
| </odoo> |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As a good practice, we leave a blank line at the end of the file