Skip to content

Commit

Permalink
Merge PR #624 into 14.0
Browse files Browse the repository at this point in the history
Signed-off-by pedrobaeza
  • Loading branch information
OCA-git-bot committed Dec 15, 2023
2 parents a08c5f2 + a2b3d8b commit fab5b59
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 9 deletions.
8 changes: 8 additions & 0 deletions sale_timesheet_order_line_no_update/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,14 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.

.. |maintainer-ilyasprogrammer| image:: https://github.com/ilyasprogrammer.png?size=40px
:target: https://github.com/ilyasprogrammer
:alt: ilyasprogrammer

Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-ilyasprogrammer|

This module is part of the `OCA/timesheet <https://github.com/OCA/timesheet/tree/14.0/sale_timesheet_order_line_no_update>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
5 changes: 3 additions & 2 deletions sale_timesheet_order_line_no_update/__manifest__.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
# © 2023 ooops404
# Copyright 2023 ooops404 - Ilyas
# License AGPL-3 - See https://www.gnu.org/licenses/agpl-3.0.html
{
"name": "Sale Timesheet Order Line no Update",
"version": "14.0.1.0.0",
"license": "AGPL-3",
"author": "Ilyas, Ooops404, Odoo Community Association (OCA)",
"maintainers": ["ilyasprogrammer"],
"website": "https://github.com/OCA/timesheet",
"depends": ["sale_timesheet", "web_domain_field"],
"depends": ["sale_timesheet"],
"data": ["views/project.xml", "views/res_config_settings_views.xml"],
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# © 2023 ooops404
# Copyright 2023 ooops404 - Ilyas
# License AGPL-3 - See https://www.gnu.org/licenses/agpl-3.0.html
from odoo import api, models

Expand Down
6 changes: 3 additions & 3 deletions sale_timesheet_order_line_no_update/models/project.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# © 2023 ooops404
# Copyright 2023 ooops404 - Ilyas
# License AGPL-3 - See https://www.gnu.org/licenses/agpl-3.0.html
from odoo import api, fields, models

Expand All @@ -13,14 +13,14 @@ class ProjectTask(models.Model):
)
hide_original_sol = fields.Boolean()

new_sale_line_id_domain = fields.Char(related="project_id.sale_line_id_domain")
new_sale_line_id_domain = fields.Binary(related="project_id.sale_line_id_domain")


class ProjectProject(models.Model):
_inherit = "project.project"

select_all_project_sale_items = fields.Boolean()
sale_line_id_domain = fields.Char(
sale_line_id_domain = fields.Binary(
compute="_compute_sale_line_id_domain",
readonly=True,
store=False,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# © 2023 ooops404
# Copyright 2023 ooops404 - Ilyas
# License AGPL-3 - See https://www.gnu.org/licenses/agpl-3.0.html
from odoo import fields, models

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,8 @@ <h2><a class="toc-backref" href="#toc-entry-5">Maintainers</a></h2>
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.</p>
<p>Current <a class="reference external" href="https://odoo-community.org/page/maintainer-role">maintainer</a>:</p>
<p><a class="reference external image-reference" href="https://github.com/ilyasprogrammer"><img alt="ilyasprogrammer" src="https://github.com/ilyasprogrammer.png?size=40px" /></a></p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/timesheet/tree/14.0/sale_timesheet_order_line_no_update">OCA/timesheet</a> project on GitHub.</p>
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ def test_sale_timesheet_order_line_sync(self):
self.assertEqual(timesheet1.so_line, sale_order_line2)
project.select_all_project_sale_items = False
project._compute_sale_line_id_domain()
self.assertIn("order_partner_id", project.sale_line_id_domain)
self.assertIn("order_partner_id", str(project.sale_line_id_domain))
project.select_all_project_sale_items = True
project._compute_sale_line_id_domain()
self.assertIn("order_id", project.sale_line_id_domain)
self.assertIn("order_id", str(project.sale_line_id_domain))

0 comments on commit fab5b59

Please sign in to comment.