Skip to content

Commit 9d221d4

Browse files
committed
[MIG] sale_timesheet_rounded : Migration to 19.0.
1 parent d3e354e commit 9d221d4

8 files changed

Lines changed: 17 additions & 23 deletions

File tree

sale_timesheet_rounded/README.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@ Sale Timesheet Rounded
2121
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
2222
:alt: License: AGPL-3
2323
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Ftimesheet-lightgray.png?logo=github
24-
:target: https://github.com/OCA/timesheet/tree/18.0/sale_timesheet_rounded
24+
:target: https://github.com/OCA/timesheet/tree/19.0/sale_timesheet_rounded
2525
:alt: OCA/timesheet
2626
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
27-
:target: https://translation.odoo-community.org/projects/timesheet-18-0/timesheet-18-0-sale_timesheet_rounded
27+
:target: https://translation.odoo-community.org/projects/timesheet-19-0/timesheet-19-0-sale_timesheet_rounded
2828
:alt: Translate me on Weblate
2929
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
30-
:target: https://runboat.odoo-community.org/builds?repo=OCA/timesheet&target_branch=18.0
30+
:target: https://runboat.odoo-community.org/builds?repo=OCA/timesheet&target_branch=19.0
3131
:alt: Try me on Runboat
3232

3333
|badge1| |badge2| |badge3| |badge4| |badge5|
@@ -94,7 +94,7 @@ Bug Tracker
9494
Bugs are tracked on `GitHub Issues <https://github.com/OCA/timesheet/issues>`_.
9595
In case of trouble, please check there if your issue has already been reported.
9696
If you spotted it first, help us to smash it by providing a detailed and welcomed
97-
`feedback <https://github.com/OCA/timesheet/issues/new?body=module:%20sale_timesheet_rounded%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
97+
`feedback <https://github.com/OCA/timesheet/issues/new?body=module:%20sale_timesheet_rounded%0Aversion:%2019.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
9898

9999
Do not contact contributors directly about support or help with technical issues.
100100

@@ -135,6 +135,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose
135135
mission is to support the collaborative development of Odoo features and
136136
promote its widespread use.
137137

138-
This module is part of the `OCA/timesheet <https://github.com/OCA/timesheet/tree/18.0/sale_timesheet_rounded>`_ project on GitHub.
138+
This module is part of the `OCA/timesheet <https://github.com/OCA/timesheet/tree/19.0/sale_timesheet_rounded>`_ project on GitHub.
139139

140140
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

sale_timesheet_rounded/__manifest__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
{
55
"name": "Sale Timesheet Rounded",
66
"summary": "Round timesheet entries amount based on project settings.",
7-
"version": "18.0.1.0.0",
7+
"version": "19.0.1.0.0",
88
"author": "Camptocamp, Odoo Community Association (OCA)",
99
"license": "AGPL-3",
1010
"category": "Sales",

sale_timesheet_rounded/hooks.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
def pre_init_hook(env):
1313
"""Initialize the value of the given column for existing rows in a fast way."""
1414
_logger.info(
15-
"Initializing column `unit_amount_rounded` with the " "value of `unit_amount`"
15+
"Initializing column `unit_amount_rounded` with the value of `unit_amount`"
1616
)
1717
table = sql.Identifier("account_analytic_line")
1818
column = sql.Identifier("unit_amount_rounded")

sale_timesheet_rounded/i18n/es.po

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ msgid ""
66
msgstr ""
77
"Project-Id-Version: Odoo Server 15.0\n"
88
"Report-Msgid-Bugs-To: \n"
9-
"PO-Revision-Date: 2026-05-10 09:27+0000\n"
9+
"PO-Revision-Date: 2026-04-16 21:45+0000\n"
1010
"Last-Translator: Ed-Spain <eduamoros@gmail.com>\n"
1111
"Language-Team: none\n"
1212
"Language: es\n"

sale_timesheet_rounded/models/account_analytic_line.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class AccountAnalyticLine(models.Model):
2020
@api.depends("timesheet_invoice_id.state")
2121
def _compute_project_id(self):
2222
field_rounded = self._fields["unit_amount_rounded"]
23-
if self._context.get("timesheet_no_recompute", False):
23+
if self.env.context.get("timesheet_no_recompute", False):
2424
self.env.remove_to_compute(field_rounded, self)
2525
return super()._compute_project_id()
2626

sale_timesheet_rounded/models/project_project.py

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,7 @@ class ProjectProject(models.Model):
3333
string="Timesheet rounding factor in percentage", default=100.0
3434
)
3535

36-
_sql_constraints = [
37-
(
38-
"check_timesheet_rounding_factor",
39-
"CHECK(0 <= timesheet_rounding_factor "
40-
"AND timesheet_rounding_factor <= 500)",
41-
"Timesheet rounding factor should stay between 0 and 500,"
42-
" endpoints included.",
43-
)
44-
]
36+
_check_timesheet_rounding_factor = models.Constraint(
37+
"CHECK(0 <= timesheet_rounding_factor AND timesheet_rounding_factor <= 500)",
38+
"Timesheet rounding factor should stay between 0 and 500, endpoints included.",
39+
)

sale_timesheet_rounded/static/description/index.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,7 @@ <h1>Sale Timesheet Rounded</h1>
374374
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
375375
!! source digest: sha256:3f8de5508660cc47eee65838db0f7c781e16aec0b0dacd6be04bbdf4020d979b
376376
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
377-
<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/timesheet/tree/18.0/sale_timesheet_rounded"><img alt="OCA/timesheet" src="https://img.shields.io/badge/github-OCA%2Ftimesheet-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/timesheet-18-0/timesheet-18-0-sale_timesheet_rounded"><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/timesheet&amp;target_branch=18.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
377+
<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/timesheet/tree/19.0/sale_timesheet_rounded"><img alt="OCA/timesheet" src="https://img.shields.io/badge/github-OCA%2Ftimesheet-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/timesheet-19-0/timesheet-19-0-sale_timesheet_rounded"><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/timesheet&amp;target_branch=19.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
378378
<p>Round timesheet lines amounts in sales based on project’ settings.</p>
379379
<p>A typical use case is: you work 5 minutes but you want to invoice 15
380380
minutes.</p>
@@ -438,7 +438,7 @@ <h2><a class="toc-backref" href="#toc-entry-3">Bug Tracker</a></h2>
438438
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/timesheet/issues">GitHub Issues</a>.
439439
In case of trouble, please check there if your issue has already been reported.
440440
If you spotted it first, help us to smash it by providing a detailed and welcomed
441-
<a class="reference external" href="https://github.com/OCA/timesheet/issues/new?body=module:%20sale_timesheet_rounded%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
441+
<a class="reference external" href="https://github.com/OCA/timesheet/issues/new?body=module:%20sale_timesheet_rounded%0Aversion:%2019.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
442442
<p>Do not contact contributors directly about support or help with technical issues.</p>
443443
</div>
444444
<div class="section" id="credits">
@@ -474,7 +474,7 @@ <h3><a class="toc-backref" href="#toc-entry-8">Maintainers</a></h3>
474474
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
475475
mission is to support the collaborative development of Odoo features and
476476
promote its widespread use.</p>
477-
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/timesheet/tree/18.0/sale_timesheet_rounded">OCA/timesheet</a> project on GitHub.</p>
477+
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/timesheet/tree/19.0/sale_timesheet_rounded">OCA/timesheet</a> project on GitHub.</p>
478478
<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>
479479
</div>
480480
</div>

sale_timesheet_rounded/tests/test_rounded.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def setUpClass(cls):
2525
"name": cls.product_delivery_timesheet2.name,
2626
"product_id": cls.product_delivery_timesheet2.id,
2727
"product_uom_qty": 1,
28-
"product_uom": cls.product_delivery_timesheet2.uom_id.id,
28+
"product_uom_id": cls.product_delivery_timesheet2.uom_id.id,
2929
"price_unit": cls.product_delivery_timesheet2.list_price,
3030
}
3131
)
@@ -46,7 +46,6 @@ def setUpClass(cls):
4646
"type": "service",
4747
"invoice_policy": "order",
4848
"uom_id": cls.product_delivery_timesheet2.uom_id.id,
49-
"uom_po_id": cls.product_delivery_timesheet2.uom_id.id,
5049
}
5150
)
5251
cls.analytic_plan = cls.env["account.analytic.plan"].create(

0 commit comments

Comments
 (0)