Skip to content

Commit

Permalink
[FIX] base_multi_company: Initialize variable in _check_company
Browse files Browse the repository at this point in the history
For avodiding the crash if not entering any if.
  • Loading branch information
pedrobaeza committed Nov 29, 2023
1 parent ef96ced commit 1a359ac
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion base_multi_company/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Multi Company Base
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:6d6ff10dcb14910d1ce8045c56f48b9129c404acd940d705aa4283a0d4c197a2
!! source digest: sha256:6309ee0a77f77e59257f3376ff5afae2ef98ab66cbb83c83915f00b4315c1aa3
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Production%2FStable-green.png
Expand Down
2 changes: 1 addition & 1 deletion base_multi_company/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{
"name": "Multi Company Base",
"summary": "Provides a base for adding multi-company support to models.",
"version": "14.0.1.1.5",
"version": "14.0.1.1.6",
"author": "ACSONE SA/NV, LasLabs, Tecnativa, Odoo Community Association (OCA)",
"category": "base",
"website": "https://github.com/OCA/multi-company",
Expand Down
1 change: 1 addition & 0 deletions base_multi_company/models/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ def _check_company(self, fnames=None):
for being taking into account when computing the company of many2one's
relations that links with our multi-company models.
"""
company_source_id = False
if self._name == "res.company":
company_source_id = self.id
elif "company_id" in self._fields:
Expand Down
2 changes: 1 addition & 1 deletion base_multi_company/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ <h1 class="title">Multi Company Base</h1>
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:6d6ff10dcb14910d1ce8045c56f48b9129c404acd940d705aa4283a0d4c197a2
!! source digest: sha256:6309ee0a77f77e59257f3376ff5afae2ef98ab66cbb83c83915f00b4315c1aa3
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Production/Stable" src="https://img.shields.io/badge/maturity-Production%2FStable-green.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/lgpl-3.0-standalone.html"><img alt="License: LGPL-3" src="https://img.shields.io/badge/licence-LGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/multi-company/tree/14.0/base_multi_company"><img alt="OCA/multi-company" src="https://img.shields.io/badge/github-OCA%2Fmulti--company-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/multi-company-14-0/multi-company-14-0-base_multi_company"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/multi-company&amp;target_branch=14.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p>This module will provide a way to change the way Odoo manages a ‘multi-company’
Expand Down

0 comments on commit 1a359ac

Please sign in to comment.