Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion mcfix_account/models/account_move.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
from odoo import api, models, _
from odoo import api, models, fields, _
from odoo.exceptions import UserError, ValidationError


Expand Down Expand Up @@ -101,6 +101,12 @@ def _check_company_dummy_account_id(self):
class AccountMoveLine(models.Model):
_inherit = "account.move.line"

# It is non-sensical for account_move_lines to be
# have a write access to company_id on account.account.
# It causes unnecessary write calls to account.account
# and constraint validations.
company_id = fields.Many2one(readonly=True)

@api.multi
@api.depends('company_id')
def name_get(self):
Expand Down