- 
                Notifications
    
You must be signed in to change notification settings  - Fork 2.7k
 
QUCOL Onboarding #993
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
      
      
            qucol-odoo
  wants to merge
  17
  commits into
  odoo:19.0
  
    
      
        
          
  
    
      Choose a base branch
      
     
    
      
        
      
      
        
          
          
        
        
          
            
              
              
              
  
           
        
        
          
            
              
              
           
        
       
     
  
        
          
            
          
            
          
        
       
    
      
from
odoo-dev:19.0-onboarding-qucol
  
      
      
   
  
    
  
  
  
 
  
      
    base: 19.0
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
                    QUCOL Onboarding #993
Changes from all commits
      Commits
    
    
            Show all changes
          
          
            17 commits
          
        
        Select commit
          Hold shift + click to select a range
      
      326711a
              
                [ADD] estate: Chapter 2
              
              
                qucol-odoo 04fcfac
              
                [IMP] estate: Chapter 3
              
              
                qucol-odoo a14ca42
              
                [IMP] estate: Chapter 4
              
              
                qucol-odoo 8d89c74
              
                [IMP] estate: Chapter 5
              
              
                qucol-odoo f1039c9
              
                [IMP] estate: Chapter 6
              
              
                qucol-odoo 89e7d4d
              
                [IMP] estate: Chapter 7
              
              
                qucol-odoo c801045
              
                [IMP] estate: Chapter 8
              
              
                qucol-odoo f9cf0c7
              
                [IMP] estate: Chapter 9
              
              
                qucol-odoo 96568d0
              
                [IMP] estate: Chapter 10
              
              
                qucol-odoo 8edf702
              
                [IMP] estate: Chapter 11
              
              
                qucol-odoo 04e09e5
              
                [IMP] estate: Chapter 12
              
              
                qucol-odoo ba956ab
              
                [ADD] estate.account: Chapter 13
              
              
                qucol-odoo bdfb5af
              
                [IMP] estate: Chapter 14
              
              
                qucol-odoo e2b32f8
              
                [CLN] estate: Chapter 15
              
              
                qucol-odoo d226474
              
                [IMP] estate: Unit Tests
              
              
                qucol-odoo b91bfa6
              
                [IMP] estate: Set garden_area and garden_orientation in Settings
              
              
                qucol-odoo 601b9a6
              
                [IMP] estate: Define module data
              
              
                qucol-odoo 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
          Some comments aren't visible on the classic Files Changed page.
        
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 | 
|---|---|---|
| @@ -0,0 +1 @@ | ||
| from . import models | 
  
    
      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,25 @@ | ||
| { | ||
| 'name': 'Estate', | ||
| 'depends': [ | ||
| 'base' | ||
| ], | ||
| 'data': [ | ||
| 'security/ir.model.access.csv', | ||
| 'data/ir_config_parameter_data.xml', | ||
| 'data/estate_types.xml', | ||
| 'views/estate_property_views.xml', | ||
| 'views/estate_property_offer_views.xml', | ||
| 'views/estate_property_type_views.xml', | ||
| 'views/estate_property_tag_views.xml', | ||
| 'views/estate_res_user_views.xml', | ||
| 'views/res_config_settings_views.xml', | ||
| 'views/estate_menu_views.xml' | ||
| ], | ||
| 'demo': [ | ||
| 'demo/demo_property_data.xml', | ||
| 'demo/demo_offer_data.xml' | ||
| ], | ||
| 'application': True, | ||
| 'author': 'Odoo S.A.', | ||
| 'license': 'LGPL-3' | ||
| } | 
  
    
      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,14 @@ | ||
| <odoo> | ||
| <record id="estate_residential_type" model="estate.property.type"> | ||
| <field name="name">Residential</field> | ||
| </record> | ||
| <record id="estate_commercial_type" model="estate.property.type"> | ||
| <field name="name">Commercial</field> | ||
| </record> | ||
| <record id="estate_industrial_type" model="estate.property.type"> | ||
| <field name="name">Industrial</field> | ||
| </record> | ||
| <record id="estate_land_type" model="estate.property.type"> | ||
| <field name="name">Land</field> | ||
| </record> | ||
| </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,12 @@ | ||
| <odoo> | ||
| <data noupdate="1"> | ||
| <record id="ir_config_parameter_estate_garden_area" model="ir.config_parameter" forcecreate="False"> | ||
| <field name="key">estate.default_garden_area</field> | ||
| <field name="value">10</field> | ||
| </record> | ||
| <record id="ir_config_parameter_estate_garden_orientation" model="ir.config_parameter" forcecreate="False"> | ||
| <field name="key">estate.default_garden_orientation</field> | ||
| <field name="value">north</field> | ||
| </record> | ||
| </data> | ||
| </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,26 @@ | ||
| <odoo> | ||
| <record id="estate_offer_1" model="estate.property.offer"> | ||
| <field name="partner_id" ref="base.res_partner_12"/> | ||
| <field name="property_id" ref="big_villa"/> | ||
| <field name="price">10000</field> | ||
| <field name="validity">14</field> | ||
| </record> | ||
| 
     | 
||
| <record id="estate_offer_2" model="estate.property.offer"> | ||
| <field name="partner_id" ref="base.res_partner_12"/> | ||
| <field name="property_id" ref="big_villa"/> | ||
| <field name="price">1500000</field> | ||
| <field name="validity">14</field> | ||
| </record> | ||
| 
     | 
||
| <record id="estate_offer_3" model="estate.property.offer"> | ||
| <field name="partner_id" ref="base.res_partner_2"/> | ||
| <field name="property_id" ref="big_villa"/> | ||
| <field name="price">1500001</field> | ||
| <field name="validity">14</field> | ||
| </record> | ||
| 
     | 
||
| <function model="estate.property.offer" name="action_accept_offer"> | ||
| <value eval="[ref('estate_offer_3')]"/> | ||
| </function> | ||
| </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,55 @@ | ||
| <odoo> | ||
| <record id="big_villa" model="estate.property"> | ||
| <field name="name">Big Villa</field> | ||
| <field name="state">new</field> | ||
| <field name="property_type_id" ref="estate_residential_type"/> | ||
| <field name="description">A nice and big villa</field> | ||
| <field name="postcode">12345</field> | ||
| <field name="date_availability">2020-02-02</field> | ||
| <field name="expected_price">1600000</field> | ||
| <field name="bedrooms">6</field> | ||
| <field name="living_area">100</field> | ||
| <field name="facades">4</field> | ||
| <field name="garage">True</field> | ||
| <field name="garden">True</field> | ||
| <field name="garden_area">100000</field> | ||
| <field name="garden_orientation">south</field> | ||
| </record> | ||
| 
     | 
||
| <record id="trailer_home" model="estate.property"> | ||
| <field name="name">Trailer home</field> | ||
| <field name="state">cancelled</field> | ||
| <field name="property_type_id" ref="estate_residential_type"/> | ||
| <field name="description">Home in trailer park</field> | ||
| <field name="postcode">54321</field> | ||
| <field name="date_availability">1970-01-01</field> | ||
| <field name="expected_price">100000</field> | ||
| <field name="selling_price">120000</field> | ||
| <field name="bedrooms">1</field> | ||
| <field name="living_area">10</field> | ||
| <field name="facades">4</field> | ||
| <field name="garage">False</field> | ||
| </record> | ||
| 
     | 
||
| <record id="appartment" model="estate.property"> | ||
| <field name="name">Appartment</field> | ||
| <field name="state">new</field> | ||
| <field name="property_type_id" ref="estate_residential_type"/> | ||
| <field name="description">Nice appartment</field> | ||
| <field name="postcode">13579</field> | ||
| <field name="date_availability">2025-01-01</field> | ||
| <field name="expected_price">350000</field> | ||
| <field name="bedrooms">2</field> | ||
| <field name="living_area">80</field> | ||
| <field name="facades">4</field> | ||
| <field name="garage">True</field> | ||
| <field name="offer_ids" eval="[ | ||
| Command.create({ | ||
| 'partner_id': ref('base.res_partner_3'), | ||
| 'price': 300000, | ||
| 'validity': 14 | ||
| }) | ||
| ]" | ||
| /> | ||
| </record> | ||
| </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,6 @@ | ||
| from . import estate_property | ||
| from . import estate_property_offer | ||
| from . import estate_property_tag | ||
| from . import estate_property_type | ||
| from . import res_config_settings | ||
| from . import res_user | 
  
    
      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,101 @@ | ||
| from odoo import api, fields, models, _ | ||
| from odoo.exceptions import UserError, ValidationError | ||
| from odoo.tools import float_compare | ||
| 
     | 
||
| 
     | 
||
| class PropertyModel(models.Model): | ||
| _name = "estate.property" | ||
| _description = "Estate Property model" | ||
| _order = "id desc" | ||
| 
     | 
||
| name = fields.Char("Title", required=True) | ||
| description = fields.Text() | ||
| postcode = fields.Char() | ||
| date_availability = fields.Date(default=fields.Date.add(fields.Date.today(), months=3), copy=False) | ||
| expected_price = fields.Float(required=True) | ||
| best_offer = fields.Float(compute="_compute_highest_price") | ||
| selling_price = fields.Float(readonly=True, copy=False) | ||
| bedrooms = fields.Integer(default=2) | ||
| living_area = fields.Integer("Living Area (sqm)") | ||
| facades = fields.Integer() | ||
| garage = fields.Boolean() | ||
| garden = fields.Boolean() | ||
| garden_area = fields.Integer("Garden Area (sqm)") | ||
| garden_orientation = fields.Selection( | ||
| selection=[('north', 'North'), ('south', 'South'), ('east', 'East'), ('west', 'West')] | ||
| ) | ||
| total_living_area = fields.Integer("Total Area (sqm)", compute="_compute_total_area") | ||
| active = fields.Boolean(default=True) | ||
| state = fields.Selection( | ||
| selection=[ | ||
| ("new", "New"), | ||
| ("received", "Offer Received"), | ||
| ("accepted", "Offer Accepted"), | ||
| ("sold", "Sold"), | ||
| ("cancelled", "Cancelled") | ||
| ], | ||
| string="Status", | ||
| required=True, | ||
| copy=False, | ||
| default="new" | ||
| ) | ||
| property_type_id = fields.Many2one("estate.property.type") | ||
| buyer_id = fields.Many2one("res.partner", copy=False) | ||
| salesperson_id = fields.Many2one("res.users", default=lambda self: self.env.user) | ||
| tag_ids = fields.Many2many("estate.property.tag") | ||
| offer_ids = fields.One2many("estate.property.offer", "property_id") | ||
| 
     | 
||
| _check_positive_expected_price = models.Constraint( | ||
| "CHECK(expected_price >= 0)", | ||
| "The expected price must be positive." | ||
| ) | ||
| _check_positive_selling_price = models.Constraint( | ||
| "CHECK(selling_price >= 0)", | ||
| "The selling price must be positive" | ||
| ) | ||
| 
     | 
||
| @api.depends("living_area", "garden_area") | ||
| def _compute_total_area(self): | ||
| for record in self: | ||
| record.total_living_area = record.living_area + record.garden_area | ||
| 
     | 
||
| @api.depends("offer_ids") | ||
| def _compute_highest_price(self): | ||
| for record in self: | ||
| record.best_offer = max(record.offer_ids.mapped("price")) if record.offer_ids else 0 | ||
| 
     | 
||
| @api.onchange("garden") | ||
| def _onchange_garden(self): | ||
| if self.garden: | ||
| self.garden_area = self.env["ir.config_parameter"].get_param("estate.default_garden_area") | ||
| self.garden_orientation = self.env["ir.config_parameter"].get_param("estate.default_garden_orientation") | ||
| else: | ||
| self.garden_area = 0 | ||
| self.garden_orientation = None | ||
| 
     | 
||
| @api.constrains("selling_price", "expected_price") | ||
| def _check_selling_price(self): | ||
| for record in self: | ||
| if record.selling_price and float_compare(record.selling_price, record.expected_price * .9, 0) == -1: | ||
| raise ValidationError("The selling price cannot be lower than 90% of the expected price.") | ||
| 
     | 
||
| @api.ondelete(at_uninstall=False) | ||
| def _unlink_if_new_or_cancelled(self): | ||
| if any(record.state not in ('new', 'cancelled') for record in self): | ||
| raise UserError(_("Only 'New' and 'Cancelled' properties can be deleted.")) | ||
| 
     | 
||
| def action_mark_as_sold(self): | ||
| self.ensure_one() | ||
| if self.state == "cancelled": | ||
| raise UserError(_("A cancelled property cannot be set as sold.")) | ||
| if not any(offer.status == "accepted" for offer in self.offer_ids): | ||
| raise UserError(_("A property must have an accepted offer to be marked as sold.")) | ||
| self.state = "sold" | ||
| return True | ||
| 
     | 
||
| def action_mark_as_cancelled(self): | ||
| self.ensure_one() | ||
| if self.state == "sold": | ||
| raise UserError(_("A sold property cannot be set as cancelled.")) | ||
| self.state = "cancelled" | ||
| return True | ||
  
    
      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,68 @@ | ||
| from odoo import api, fields, models, _ | ||
| from odoo.exceptions import UserError | ||
| 
     | 
||
| 
     | 
||
| class PropertyOfferModel(models.Model): | ||
| _name = "estate.property.offer" | ||
| _description = "Estate Property Offer model" | ||
| _order = "price desc" | ||
| 
     | 
||
| price = fields.Float() | ||
| status = fields.Selection( | ||
| selection=[ | ||
| ("accepted", "Accepted"), | ||
| ("refused", "Refused") | ||
| ], | ||
| copy=False | ||
| ) | ||
| partner_id = fields.Many2one("res.partner", required=True) | ||
| property_id = fields.Many2one("estate.property", required=True) | ||
| property_type_id = fields.Many2one(related="property_id.property_type_id", store=True) | ||
| validity = fields.Integer(default=7) | ||
| date_deadline = fields.Date(compute="_compute_deadline", inverse="_inverse_deadline") | ||
| 
     | 
||
| _check_price = models.Constraint( | ||
| "CHECK(price >= 0)", | ||
| "The price of the offer must be positive." | ||
| ) | ||
| 
     | 
||
| @api.depends("validity") | ||
| def _compute_deadline(self): | ||
| for record in self: | ||
| record.date_deadline = fields.Date.add((record.create_date or fields.Datetime.now()), days=record.validity) | ||
| 
     | 
||
| def _inverse_deadline(self): | ||
| for record in self: | ||
| record.validity = (record.date_deadline - fields.Date.to_date(record.create_date)).days if record.date_deadline else record.validity | ||
| 
     | 
||
| @api.model | ||
| def create(self, vals_list: list[dict]): | ||
| EstateProperties = self.env["estate.property"].with_prefetch( | ||
| [vals["property_id"] for vals in vals_list] | ||
| ) | ||
| for val in vals_list: | ||
| estate_property = EstateProperties.browse(val["property_id"]) | ||
| if estate_property.state == "sold": | ||
| raise UserError(_("Cannot create a new offer for a sold property.")) | ||
| if estate_property.offer_ids and val["price"] < min(estate_property.offer_ids.mapped("price")): | ||
| raise UserError(_("Cannot create a new offer with a lower price than an existing offer.")) | ||
| if estate_property.state == 'new': | ||
| estate_property.state = 'received' | ||
| return super().create(vals_list) | ||
| 
     | 
||
| def action_accept_offer(self): | ||
| self.ensure_one() | ||
| self.status = "accepted" | ||
| self.property_id.selling_price = self.price | ||
| self.property_id.buyer_id = self.partner_id | ||
| self.property_id.state = "accepted" | ||
| self.refuse_all_other_offers() | ||
| 
     | 
||
| def refuse_all_other_offers(self): | ||
| for offer in self.property_id.offer_ids: | ||
| if offer != self: | ||
| offer.status = "refused" | ||
| 
     | 
||
| def action_refuse_offer(self): | ||
| self.ensure_one() | ||
| self.status = "refused" | 
  
    
      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 fields, models | ||
| 
     | 
||
| 
     | 
||
| class PropertyTagModel(models.Model): | ||
| _name = "estate.property.tag" | ||
| _description = "Estate Property Tag model" | ||
| _order = "name" | ||
| 
     | 
||
| name = fields.Char(required=True) | ||
| color = fields.Integer() | ||
| 
     | 
||
| _check_tag_uniqueness = models.Constraint( | ||
| "UNIQUE(name)", | ||
| "Each tag should have a unique name." | ||
| ) | 
  
    
      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,23 @@ | ||
| from odoo import api, fields, models | ||
| 
     | 
||
| 
     | 
||
| class PropertyTypeModel(models.Model): | ||
| _name = "estate.property.type" | ||
| _description = "Estate Property Type model" | ||
| _order = "sequence" | ||
| 
     | 
||
| name = fields.Char(required=True) | ||
| property_ids = fields.One2many("estate.property", "property_type_id") | ||
| offer_ids = fields.One2many("estate.property.offer", "property_type_id") | ||
| offer_count = fields.Integer("Offer Count", compute="_compute_offer_count") | ||
| sequence = fields.Integer("Sequence") | ||
| 
     | 
||
| _check_type_uniqueness = models.Constraint( | ||
| "UNIQUE(name)", | ||
| "Each type should have a unique name." | ||
| ) | ||
| 
     | 
||
| @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,11 @@ | ||
| from odoo import fields, models | ||
| 
     | 
||
| 
     | 
||
| class ResConfigSettings(models.TransientModel): | ||
| _inherit = "res.config.settings" | ||
| 
     | 
||
| garden_area = fields.Integer(default=10, config_parameter="estate.default_garden_area") | ||
| garden_orientation = fields.Selection( | ||
| selection=[('north', 'North'), ('south', 'South'), ('east', 'East'), ('west', 'West')], | ||
| config_parameter="estate.default_garden_orientation" | ||
| ) | 
  
    
      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,9 @@ | ||
| from odoo import fields, models | ||
| 
     | 
||
| 
     | 
||
| class ResUser(models.Model): | ||
| _inherit = "res.users" | ||
| 
     | 
||
| property_ids = fields.One2many( | ||
| "estate.property", "salesperson_id", domain=['|', ('state', '=', 'new'), ('state', '=', '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 | ||
| estate.access_estate_property,access_estate_property,estate.model_estate_property,base.group_user,1,1,1,1 | ||
| estate.access_estate_property_type,access_estate_property_type,estate.model_estate_property_type,base.group_user,1,1,1,1 | ||
| estate.access_estate_property_tag,access_estate_property_tag,estate.model_estate_property_tag,base.group_user,1,1,1,1 | ||
| estate.access_estate_property_offer,access_estate_property_offer,estate.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 @@ | ||
| from . import test_estate_property | 
      
      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.
No need of Model inside the class name of a model, but I agree that it could have been. It is an Odoo convention.