Skip to content

Commit 7fbb070

Browse files
committed
[MIG] web_select_all_companies: Migration to 18.0
1 parent b5a214b commit 7fbb070

File tree

14 files changed

+119
-83
lines changed

14 files changed

+119
-83
lines changed

web_select_all_companies/README.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,17 @@ Contributors
6363

6464
- Telmo Santos <[email protected]>
6565

66+
- ``Trobz <https://trobz.com>``\ \_\_:
67+
68+
- Tuan Nguyen [email protected]
69+
70+
Other credits
71+
-------------
72+
73+
The migration of this module to 18.0 has been financially supported by:
74+
75+
- `NDA Group <https://www.ndateam.com>`__
76+
6677
Maintainers
6778
-----------
6879

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from . import models

web_select_all_companies/__manifest__.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,19 @@
44
{
55
"name": "Web Select All Companies",
66
"summary": "Allows you to select all companies in one click.",
7-
"version": "16.0.1.0.1",
7+
"version": "18.0.1.0.0",
88
"category": "Web",
99
"website": "https://github.com/OCA/web",
1010
"author": "Camptocamp, Odoo Community Association (OCA)",
1111
"license": "LGPL-3",
1212
"depends": ["web"],
1313
"assets": {
1414
"web.assets_backend": [
15-
"web_select_all_companies/static/src/scss/switch_all_company_menu.scss",
16-
"web_select_all_companies/static/src/xml/switch_all_company_menu.xml",
1715
"web_select_all_companies/static/src/js/switch_all_company_menu.esm.js",
1816
],
1917
},
18+
"data": [
19+
"views/res_users_views.xml",
20+
],
2021
"installable": True,
2122
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from . import res_users
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
from odoo import fields, models
2+
3+
4+
class ResUsers(models.Model):
5+
_inherit = "res.users"
6+
7+
default_company_ids = fields.Many2many(
8+
"res.company",
9+
"res_users_default_company_rel",
10+
"user_id",
11+
"company_id",
12+
string="Default Companies",
13+
help="Companies selected by default when user logs in",
14+
)
15+
16+
@property
17+
def SELF_READABLE_FIELDS(self):
18+
return super().SELF_READABLE_FIELDS + ["default_company_ids"]
19+
20+
@property
21+
def SELF_WRITEABLE_FIELDS(self):
22+
return super().SELF_WRITEABLE_FIELDS + ["default_company_ids"]
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
11
- Telmo Santos \<[email protected]\>
2+
3+
- `Trobz <https://trobz.com>`__:
4+
- Tuan Nguyen <[email protected]>
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
The migration of this module to 18.0 has been financially supported by:
2+
- [NDA Group](https://www.ndateam.com)

web_select_all_companies/static/description/index.html

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,8 @@ <h1 class="title">Web Select All Companies</h1>
380380
<li><a class="reference internal" href="#credits" id="toc-entry-2">Credits</a><ul>
381381
<li><a class="reference internal" href="#authors" id="toc-entry-3">Authors</a></li>
382382
<li><a class="reference internal" href="#contributors" id="toc-entry-4">Contributors</a></li>
383-
<li><a class="reference internal" href="#maintainers" id="toc-entry-5">Maintainers</a></li>
383+
<li><a class="reference internal" href="#other-credits" id="toc-entry-5">Other credits</a></li>
384+
<li><a class="reference internal" href="#maintainers" id="toc-entry-6">Maintainers</a></li>
384385
</ul>
385386
</li>
386387
</ul>
@@ -405,10 +406,21 @@ <h2><a class="toc-backref" href="#toc-entry-3">Authors</a></h2>
405406
<h2><a class="toc-backref" href="#toc-entry-4">Contributors</a></h2>
406407
<ul class="simple">
407408
<li>Telmo Santos &lt;<a class="reference external" href="mailto:telmo.santos&#64;camptocamp.com">telmo.santos&#64;camptocamp.com</a>&gt;</li>
409+
<li><tt class="docutils literal">Trobz <span class="pre">&lt;https://trobz.com&gt;</span></tt>__:<ul>
410+
<li>Tuan Nguyen <a class="reference external" href="mailto:tuanna&#64;trobz.com">tuanna&#64;trobz.com</a></li>
411+
</ul>
412+
</li>
413+
</ul>
414+
</div>
415+
<div class="section" id="other-credits">
416+
<h2><a class="toc-backref" href="#toc-entry-5">Other credits</a></h2>
417+
<p>The migration of this module to 18.0 has been financially supported by:</p>
418+
<ul class="simple">
419+
<li><a class="reference external" href="https://www.ndateam.com">NDA Group</a></li>
408420
</ul>
409421
</div>
410422
<div class="section" id="maintainers">
411-
<h2><a class="toc-backref" href="#toc-entry-5">Maintainers</a></h2>
423+
<h2><a class="toc-backref" href="#toc-entry-6">Maintainers</a></h2>
412424
<p>This module is maintained by the OCA.</p>
413425
<a class="reference external image-reference" href="https://odoo-community.org">
414426
<img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" />
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)