Skip to content
Open
Show file tree
Hide file tree
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
5 changes: 5 additions & 0 deletions partner_company_default/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,11 @@ Authors

* Quartile Limited

Contributors
~~~~~~~~~~~~

* Italo LOPES <italo.lopes@camptocamp.com>

Maintainers
~~~~~~~~~~~

Expand Down
1 change: 1 addition & 0 deletions partner_company_default/models/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
from . import res_company
from . import res_users
from . import res_partner
1 change: 1 addition & 0 deletions partner_company_default/models/res_partner.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ def _default_company_id(self):
context = self.env.context
if (
context.get("creating_from_company")
or context.get("creating_from_user")
or config["test_enable"]
and not context.get("test_partner_company_default")
):
Expand Down
13 changes: 13 additions & 0 deletions partner_company_default/models/res_users.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Copyright 2025 Camptocamp SA
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from odoo import api, models


class ResUsers(models.Model):
_inherit = "res.users"

@api.model_create_multi
def create(self, vals):
self = self.with_context(creating_from_user=True)
return super().create(vals)
1 change: 1 addition & 0 deletions partner_company_default/readme/CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* Italo LOPES <italo.lopes@camptocamp.com>
6 changes: 6 additions & 0 deletions partner_company_default/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,12 @@ <h1>Authors</h1>
<li>Quartile Limited</li>
</ul>
</div>
<div class="section" id="contributors">
<h1>Contributors</h1>
<ul class="simple">
<li>Italo LOPES &lt;<a class="reference external" href="mailto:italo.lopes&#64;camptocamp.com">italo.lopes&#64;camptocamp.com</a>&gt;</li>
</ul>
</div>
<div class="section" id="maintainers">
<h1>Maintainers</h1>
<p>This module is maintained by the OCA.</p>
Expand Down