Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
558a4dc
[6794][IMP] account_billing: reflect OCA changes
AungKoKoLin1997 May 21, 2026
7fc9af3
[6794][IMP] account_move_order_partner: reflect OCA changes
AungKoKoLin1997 May 21, 2026
b162e72
[6794][IMP] auditlog: reflect OCA changes
AungKoKoLin1997 May 21, 2026
52624eb
[6794][IMP] base_user_role: reflect OCA changes
AungKoKoLin1997 May 21, 2026
002d859
[6794][IMP] l10n_jp_country_state: reflect OCA changes
AungKoKoLin1997 May 21, 2026
16fd213
[6794][IMP] l10n_jp_summary_invoice: reflect OCA changes
AungKoKoLin1997 May 21, 2026
be89268
[6794][IMP] mail_layout_force: reflect OCA changes
AungKoKoLin1997 May 21, 2026
d7a69b4
[6794][IMP] partner_bank_acc_holder_name: reflect OCA changes
AungKoKoLin1997 May 21, 2026
7b408e7
[6794][IMP] partner_contact_address_default: reflect OCA changes
AungKoKoLin1997 May 21, 2026
c83b633
[6794][IMP] purchase_order_etd_eta: reflect OCA changes
AungKoKoLin1997 May 21, 2026
4878e5a
[6794][IMP] purchase_order_secondary_unit: reflect OCA changes
AungKoKoLin1997 May 21, 2026
7f13d85
[6794][IMP] report_pdf_zip_download: reflect OCA changes
AungKoKoLin1997 May 21, 2026
fc02417
[6794][IMP] report_positioned_image: reflect OCA changes
AungKoKoLin1997 May 21, 2026
d025c95
[6794][IMP] report_qweb_field_option: reflect OCA changes
AungKoKoLin1997 May 21, 2026
25f4d42
[6794][IMP] sale_commercial_partner: reflect OCA changes
AungKoKoLin1997 May 21, 2026
d2b81c1
[6794][IMP] sale_line_name_option: reflect OCA changes
AungKoKoLin1997 May 21, 2026
dbe0990
[6794][IMP] sale_partner_shipping_default_partner_invoice: reflect OC…
AungKoKoLin1997 May 21, 2026
da54084
[6794][IMP] sale_pricelist_from_commitment_date: reflect OCA changes
AungKoKoLin1997 May 21, 2026
78e19c0
[6794][IMP] sale_stock_partner_warehouse: reflect OCA changes
AungKoKoLin1997 May 21, 2026
d092453
[6794][IMP] stock_move_actual_date: reflect OCA changes
AungKoKoLin1997 May 21, 2026
4aaa26b
[6794][IMP] template_content_swapper: reflect OCA changes
AungKoKoLin1997 May 21, 2026
ee57229
[6794][IMP] web_favicon: reflect OCA changes
AungKoKoLin1997 May 21, 2026
f6075b1
[6794][IMP] web_form_banner: reflect OCA changes
AungKoKoLin1997 May 21, 2026
64c1992
[6794][IMP] web_m2x_options: reflect OCA changes
AungKoKoLin1997 May 21, 2026
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
16 changes: 10 additions & 6 deletions account_billing/README.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
.. image:: https://odoo-community.org/readme-banner-image
:target: https://odoo-community.org/get-involved?utm_source=readme
:alt: Odoo Community Association

===============
Billing Process
===============
Expand All @@ -7,13 +11,13 @@ Billing Process
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:92c644c45d119de640798ae4ef9b43eb634e6b78de5811a1ac6c5f3d647499f0
!! source digest: sha256:50d733e0ce5080841df88469b4939fc61943ac75ba37cb787877b142628c7554
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
.. |badge2| image:: https://img.shields.io/badge/license-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Faccount--invoicing-lightgray.png?logo=github
Expand Down Expand Up @@ -79,10 +83,10 @@ Authors
Contributors
------------

- Kitti U. <kittiu@ecosoft.co.th>
- Saran Lim. <saranl@ecosoft.co.th>
- Rattapong Chokmasermkul <rattapongc@ecosoft.co.th>
- Komsan Somwong <komsan.s@ecosoft.co.th>
- Kitti U. <kittiu@ecosoft.co.th>
- Saran Lim. <saranl@ecosoft.co.th>
- Rattapong Chokmasermkul <rattapongc@ecosoft.co.th>
- Komsan Somwong <komsan.s@ecosoft.co.th>

Maintainers
-----------
Expand Down
2 changes: 1 addition & 1 deletion account_billing/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{
"name": "Billing Process",
"summary": "Group invoice as billing before payment",
"version": "18.0.1.1.1",
"version": "18.0.1.3.0",
"author": "Ecosoft, Odoo Community Association (OCA)",
"license": "AGPL-3",
"website": "https://github.com/OCA/account-invoicing",
Expand Down
23 changes: 12 additions & 11 deletions account_billing/models/account_billing.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,18 +116,19 @@ def _compute_payment_paid_all(self):
line.payment_state == "paid" for line in rec.billing_line_ids
)

def _get_moves_domain(self, date, types=False):
return [
("partner_id", "=", self.partner_id.id),
("state", "=", "posted"),
("payment_state", "!=", "paid"),
("currency_id", "=", self.currency_id.id),
(date, "<=", self.threshold_date),
("move_type", "in", types),
]

def _get_moves(self, date, types=False):
moves = self.env["account.move"].search(
[
("partner_id", "=", self.partner_id.id),
("state", "=", "posted"),
("payment_state", "!=", "paid"),
("currency_id", "=", self.currency_id.id),
(date, "<=", self.threshold_date),
("move_type", "in", types),
]
)
return moves._sort_for_billing(self.threshold_date_type)
domain = self._get_moves_domain(date, types=types)
return self.env["account.move"].search(domain)

def _compute_invoice_related_count(self):
self.invoice_related_count = len(self.billing_line_ids)
Expand Down
17 changes: 9 additions & 8 deletions account_billing/models/account_move.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,29 +8,30 @@
class AccountMove(models.Model):
_inherit = "account.move"

billing_line_ids = fields.One2many(
comodel_name="account.billing.line",
inverse_name="move_id",
string="Billing Lines",
help="Billing lines that reference this invoice",
)
billing_ids = fields.Many2many(
comodel_name="account.billing",
string="Billings",
compute="_compute_billing_ids",
groups="account.group_account_invoice",
help="Relationship between invoice and billing",
)

def _compute_billing_ids(self):
bl_obj = self.env["account.billing.line"]
for rec in self:
billing_lines = bl_obj.search([("move_id", "=", rec.id)])
rec.billing_ids = billing_lines.mapped("billing_id")
rec.billing_ids = rec.billing_line_ids.mapped("billing_id")

def _get_billing_type(self):
outbound_types = {"out_invoice", "out_refund", "out_receipt"}
move_types = set(self.mapped("move_type"))
return "out_invoice" if move_types.issubset(outbound_types) else "in_invoice"

def _sort_for_billing(self, date_field):
return self.sorted(key=lambda m: (m[date_field], m.name, m.id))

def _create_billing(self, partner):
date_field = self.env["account.billing"]._get_default_threshold_date_type()
billing = self.env["account.billing"].create(
{
"partner_id": partner.id,
Expand All @@ -46,7 +47,7 @@ def _create_billing(self, partner):
* (-1 if m.move_type in ["out_refund", "in_refund"] else 1),
}
)
for m in self._sort_for_billing(date_field)
for m in self
],
}
)
Expand Down
28 changes: 17 additions & 11 deletions account_billing/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils: https://docutils.sourceforge.io/" />
<title>Billing Process</title>
<title>README.rst</title>
<style type="text/css">

/*
Expand Down Expand Up @@ -360,16 +360,21 @@
</style>
</head>
<body>
<div class="document" id="billing-process">
<h1 class="title">Billing Process</h1>
<div class="document">


<a class="reference external image-reference" href="https://odoo-community.org/get-involved?utm_source=readme">
<img alt="Odoo Community Association" src="https://odoo-community.org/readme-banner-image" />
</a>
<div class="section" id="billing-process">
<h1>Billing Process</h1>
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:92c644c45d119de640798ae4ef9b43eb634e6b78de5811a1ac6c5f3d647499f0
!! source digest: sha256:50d733e0ce5080841df88469b4939fc61943ac75ba37cb787877b142628c7554
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/account-invoicing/tree/18.0/account_billing"><img alt="OCA/account-invoicing" src="https://img.shields.io/badge/github-OCA%2Faccount--invoicing-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/account-invoicing-18-0/account-invoicing-18-0-account_billing"><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/account-invoicing&amp;target_branch=18.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/license-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/account-invoicing/tree/18.0/account_billing"><img alt="OCA/account-invoicing" src="https://img.shields.io/badge/github-OCA%2Faccount--invoicing-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/account-invoicing-18-0/account-invoicing-18-0-account_billing"><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/account-invoicing&amp;target_branch=18.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p>In some countries, there is a customary practice for companies to
collect money from their customers only once in a month. For example,
the customer has 3 payments due in a given month, the vendor or billing
Expand All @@ -393,7 +398,7 @@ <h1 class="title">Billing Process</h1>
</ul>
</div>
<div class="section" id="usage">
<h1><a class="toc-backref" href="#toc-entry-1">Usage</a></h1>
<h2><a class="toc-backref" href="#toc-entry-1">Usage</a></h2>
<p>To use this module, you have 2 ways:</p>
<ol class="arabic">
<li><div class="first line-block">
Expand All @@ -411,23 +416,23 @@ <h1><a class="toc-backref" href="#toc-entry-1">Usage</a></h1>
</ol>
</div>
<div class="section" id="bug-tracker">
<h1><a class="toc-backref" href="#toc-entry-2">Bug Tracker</a></h1>
<h2><a class="toc-backref" href="#toc-entry-2">Bug Tracker</a></h2>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/account-invoicing/issues">GitHub Issues</a>.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
<a class="reference external" href="https://github.com/OCA/account-invoicing/issues/new?body=module:%20account_billing%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<p>Do not contact contributors directly about support or help with technical issues.</p>
</div>
<div class="section" id="credits">
<h1><a class="toc-backref" href="#toc-entry-3">Credits</a></h1>
<h2><a class="toc-backref" href="#toc-entry-3">Credits</a></h2>
<div class="section" id="authors">
<h2><a class="toc-backref" href="#toc-entry-4">Authors</a></h2>
<h3><a class="toc-backref" href="#toc-entry-4">Authors</a></h3>
<ul class="simple">
<li>Ecosoft</li>
</ul>
</div>
<div class="section" id="contributors">
<h2><a class="toc-backref" href="#toc-entry-5">Contributors</a></h2>
<h3><a class="toc-backref" href="#toc-entry-5">Contributors</a></h3>
<ul class="simple">
<li>Kitti U. &lt;<a class="reference external" href="mailto:kittiu&#64;ecosoft.co.th">kittiu&#64;ecosoft.co.th</a>&gt;</li>
<li>Saran Lim. &lt;<a class="reference external" href="mailto:saranl&#64;ecosoft.co.th">saranl&#64;ecosoft.co.th</a>&gt;</li>
Expand All @@ -436,7 +441,7 @@ <h2><a class="toc-backref" href="#toc-entry-5">Contributors</a></h2>
</ul>
</div>
<div class="section" id="maintainers">
<h2><a class="toc-backref" href="#toc-entry-6">Maintainers</a></h2>
<h3><a class="toc-backref" href="#toc-entry-6">Maintainers</a></h3>
<p>This module is maintained by the OCA.</p>
<a class="reference external image-reference" href="https://odoo-community.org">
<img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" />
Expand All @@ -451,5 +456,6 @@ <h2><a class="toc-backref" href="#toc-entry-6">Maintainers</a></h2>
</div>
</div>
</div>
</div>
</body>
</html>
1 change: 0 additions & 1 deletion account_billing/views/account_billing_views.xml
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,6 @@
class="oe_stat_button"
name="invoice_relate_billing_tree_view"
type="object"
invisible="state != 'billed'"
icon="fa-pencil-square-o"
>
<field
Expand Down
4 changes: 2 additions & 2 deletions account_move_order_partner/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@ Authors
Contributors
------------

- Quartile <https://www.quartile.co>
- Quartile <https://www.quartile.co>

- Aung Ko Ko Lin
- Aung Ko Ko Lin

Maintainers
-----------
Expand Down
2 changes: 1 addition & 1 deletion auditlog/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Audit Log
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:e0e544c7a26986bb9117c221de2a8725c1ac094fd65ad0b4719fc51df383d7e2
!! source digest: sha256:a0543c8ac1272df7c45f3f3ab1e658d0031331b342ea25d7eb5fccc3c23e05df
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
Expand Down
2 changes: 1 addition & 1 deletion auditlog/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

{
"name": "Audit Log",
"version": "18.0.2.0.7",
"version": "18.0.2.0.9",
"author": "ABF OSIELL, Odoo Community Association (OCA)",
"license": "AGPL-3",
"website": "https://github.com/OCA/server-tools",
Expand Down
2 changes: 1 addition & 1 deletion auditlog/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ <h1>Audit Log</h1>
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:e0e544c7a26986bb9117c221de2a8725c1ac094fd65ad0b4719fc51df383d7e2
!! source digest: sha256:a0543c8ac1272df7c45f3f3ab1e658d0031331b342ea25d7eb5fccc3c23e05df
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/license-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/server-tools/tree/18.0/auditlog"><img alt="OCA/server-tools" src="https://img.shields.io/badge/github-OCA%2Fserver--tools-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/server-tools-18-0/server-tools-18-0-auditlog"><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/server-tools&amp;target_branch=18.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p>This module allows the administrator to log user operations performed on
Expand Down
10 changes: 9 additions & 1 deletion auditlog/tests/test_auditlog.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# © 2018 Pieter Paulussen <pieter_paulussen@me.com>
# © 2021 Stefan Rijnhart <stefan@opener.amsterdam>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from odoo.tests import tagged
from odoo.tools import mute_logger

from odoo.addons.base.models.ir_model import MODULE_UNINSTALL_FLAG
Expand Down Expand Up @@ -280,6 +280,7 @@ def test_LogDelete(self):
)


@tagged("-at_install", "post_install")
class TestAuditlogFull(AuditLogRuleCommon, AuditlogCommon):
@classmethod
def setUpClass(cls):
Expand All @@ -298,6 +299,7 @@ def setUpClass(cls):
)


@tagged("-at_install", "post_install")
class TestAuditlogExportData(AuditLogRuleCommon):
@classmethod
def setUpClass(cls):
Expand Down Expand Up @@ -329,6 +331,7 @@ def test_LogExport(self):
self.assertIsInstance(domain[0][2], list)


@tagged("-at_install", "post_install")
class TestAuditlogFast(AuditLogRuleCommon, AuditlogCommon):
@classmethod
def setUpClass(cls):
Expand All @@ -347,6 +350,7 @@ def setUpClass(cls):
)


@tagged("-at_install", "post_install")
class TestFieldRemoval(AuditLogRuleCommon):
@classmethod
def setUpClass(cls):
Expand Down Expand Up @@ -444,6 +448,7 @@ def test_01_field_and_model_removal(self):
self.assertFalse(self.auditlog_rule.model_id)


@tagged("-at_install", "post_install")
class TestAuditlogFullCaptureRecord(AuditLogRuleCommon, AuditlogCommon):
@classmethod
def setUpClass(cls):
Expand All @@ -463,6 +468,7 @@ def setUpClass(cls):
)


@tagged("-at_install", "post_install")
class AuditLogRuleTestForUserFields(AuditLogRuleCommon):
@classmethod
def setUpClass(cls):
Expand Down Expand Up @@ -647,6 +653,7 @@ def test_06_AuditlogFull_unlink_log(self):
self.assertTrue(delete_log_record)


@tagged("-at_install", "post_install")
class AuditLogRuleTestForUserModel(AuditLogRuleCommon):
@classmethod
def setUpClass(cls):
Expand Down Expand Up @@ -723,6 +730,7 @@ def test_02_AuditlogFull_field_group_write_log(self):
self.assertTrue(write_log_record)


@tagged("-at_install", "post_install")
class AuditlogFast_excluded_fields(AuditLogRuleCommon):
@classmethod
def setUpClass(cls):
Expand Down
3 changes: 3 additions & 0 deletions auditlog/tests/test_autovacuum.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,12 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
import time

from odoo.tests import tagged

from .common import AuditLogRuleCommon


@tagged("-at_install", "post_install")
class TestAuditlogAutovacuum(AuditLogRuleCommon):
def setUp(self):
super().setUp()
Expand Down
6 changes: 5 additions & 1 deletion auditlog/tests/test_http.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,11 @@ def test_compute_display_name(self):
},
)
logs = self.env["auditlog.log"].search(
[("model_id", "=", rule.model_id.id), ("res_id", "=", partner.id)]
[
("model_id", "=", rule.model_id.id),
("res_id", "=", partner.id),
("line_ids.field_name", "=", "name"),
]
)
self.assertEqual(len(logs), 1)
http_request_id = logs[0]["http_request_id"]
Expand Down
2 changes: 1 addition & 1 deletion base_user_role/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ User roles
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:b3aa00f609d45dcd82a69b2a3e13b327096ab1d25883b543e3e45538e854d40c
!! source digest: sha256:99ab17708d54615c87b2764f44327b9a8908fbf188fdcfbd80b301b453c8207a
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Production%2FStable-green.png
Expand Down
2 changes: 1 addition & 1 deletion base_user_role/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

{
"name": "User roles",
"version": "18.0.1.0.5",
"version": "18.0.1.0.7",
"category": "Tools",
"author": "ABF OSIELL, Odoo Community Association (OCA)",
"license": "LGPL-3",
Expand Down
6 changes: 4 additions & 2 deletions base_user_role/models/role.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@ class ResUsersRole(models.Model):
string="Associated group",
)
line_ids = fields.One2many(
comodel_name="res.users.role.line", inverse_name="role_id", string="Role lines"
comodel_name="res.users.role.line",
inverse_name="role_id",
string="Role lines",
domain=[("user_id.active", "=", True)],
)
user_ids = fields.One2many(
comodel_name="res.users", string="Users list", compute="_compute_user_ids"
Expand Down Expand Up @@ -134,7 +137,6 @@ class ResUsersRoleLine(models.Model):
_name = "res.users.role.line"
_description = "Users associated to a role"

active = fields.Boolean(related="user_id.active")
role_id = fields.Many2one(
comodel_name="res.users.role", required=True, string="Role", ondelete="cascade"
)
Expand Down
Loading
Loading