Skip to content

Commit

Permalink
[MIG] sale_timesheet_line_exclude: Migration to 18.0
Browse files Browse the repository at this point in the history
  • Loading branch information
HeliconiaSolutions committed Jan 2, 2025
1 parent bf7571a commit 0b76d81
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 30 deletions.
18 changes: 10 additions & 8 deletions sale_timesheet_line_exclude/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ Sales Timesheet: exclude Timesheet Line from Sale Order
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Ftimesheet-lightgray.png?logo=github
:target: https://github.com/OCA/timesheet/tree/17.0/sale_timesheet_line_exclude
:target: https://github.com/OCA/timesheet/tree/18.0/sale_timesheet_line_exclude
:alt: OCA/timesheet
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/timesheet-17-0/timesheet-17-0-sale_timesheet_line_exclude
:target: https://translation.odoo-community.org/projects/timesheet-18-0/timesheet-18-0-sale_timesheet_line_exclude
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/timesheet&target_branch=17.0
:target: https://runboat.odoo-community.org/builds?repo=OCA/timesheet&target_branch=18.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|
Expand Down Expand Up @@ -62,7 +62,7 @@ Bug Tracker
Bugs are tracked on `GitHub Issues <https://github.com/OCA/timesheet/issues>`_.
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
`feedback <https://github.com/OCA/timesheet/issues/new?body=module:%20sale_timesheet_line_exclude%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
`feedback <https://github.com/OCA/timesheet/issues/new?body=module:%20sale_timesheet_line_exclude%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

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

Expand All @@ -77,10 +77,12 @@ Authors
Contributors
------------

- `CorporateHub <https://corporatehub.eu/>`__
- `CorporateHub <https://corporatehub.eu/>`__

- Alexey Pelykh <[email protected]>
- Freni Patel <[email protected]>
- Alexey Pelykh <[email protected]>
- Freni Patel <[email protected]>

- ``Heliconia Solutions Pvt. Ltd. <https://www.heliconia.io>``\ \_

Maintainers
-----------
Expand All @@ -95,6 +97,6 @@ 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.

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

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
2 changes: 1 addition & 1 deletion sale_timesheet_line_exclude/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

{
"name": "Sales Timesheet: exclude Timesheet Line from Sale Order",
"version": "17.0.1.1.0",
"version": "18.0.1.0.0",
"category": "Sales",
"website": "https://github.com/OCA/timesheet",
"author": "CorporateHub, " "Odoo Community Association (OCA)",
Expand Down
1 change: 1 addition & 0 deletions sale_timesheet_line_exclude/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
- [CorporateHub](https://corporatehub.eu/)
- Alexey Pelykh \<<[email protected]>\>
- Freni Patel \<<[email protected]>\>
- `Heliconia Solutions Pvt. Ltd. <https://www.heliconia.io>`_
18 changes: 11 additions & 7 deletions sale_timesheet_line_exclude/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@

/*
:Author: David Goodger ([email protected])
:Id: $Id: html4css1.css 8954 2022-01-20 10:10:25Z milde $
:Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $
:Copyright: This stylesheet has been placed in the public domain.

Default cascading style sheet for the HTML output of Docutils.
Despite the name, some widely supported CSS2 features are used.

See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to
customize this style sheet.
Expand Down Expand Up @@ -274,7 +275,7 @@
margin-left: 2em ;
margin-right: 2em }

pre.code .ln { color: grey; } /* line numbers */
pre.code .ln { color: gray; } /* line numbers */
pre.code, code { background-color: #eeeeee }
pre.code .comment, code .comment { color: #5C6576 }
pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
Expand All @@ -300,7 +301,7 @@
span.pre {
white-space: pre }

span.problematic {
span.problematic, pre.problematic {
color: red }

span.section-subtitle {
Expand Down Expand Up @@ -368,7 +369,7 @@ <h1 class="title">Sales Timesheet: exclude Timesheet Line from Sale Order</h1>
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:7567c7037cfe201f77314ef79d26efafc193e53aef07dcde43160198dffb4e15
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<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/timesheet/tree/17.0/sale_timesheet_line_exclude"><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-17-0/timesheet-17-0-sale_timesheet_line_exclude"><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=17.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/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/timesheet/tree/18.0/sale_timesheet_line_exclude"><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_line_exclude"><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>
<p>Allows to exclude specific <em>Timesheet</em> line from Sale Order.</p>
<p>This feature proves itself useful for <em>By Task</em> billing approach, when a
specific timesheet entry tracked towards a billable task needs to be
Expand Down Expand Up @@ -405,7 +406,7 @@ <h1><a class="toc-backref" href="#toc-entry-2">Bug Tracker</a></h1>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/timesheet/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/timesheet/issues/new?body=module:%20sale_timesheet_line_exclude%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<a class="reference external" href="https://github.com/OCA/timesheet/issues/new?body=module:%20sale_timesheet_line_exclude%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">
Expand All @@ -424,16 +425,19 @@ <h2><a class="toc-backref" href="#toc-entry-5">Contributors</a></h2>
<li>Freni Patel &lt;<a class="reference external" href="mailto:fpatel&#64;opensourceintegrators.com">fpatel&#64;opensourceintegrators.com</a>&gt;</li>
</ul>
</li>
<li><tt class="docutils literal">Heliconia Solutions Pvt. Ltd. <span class="pre">&lt;https://www.heliconia.io&gt;</span></tt>_</li>
</ul>
</div>
<div class="section" id="maintainers">
<h2><a class="toc-backref" href="#toc-entry-6">Maintainers</a></h2>
<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" /></a>
<a class="reference external image-reference" href="https://odoo-community.org">
<img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" />
</a>
<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>This module is part of the <a class="reference external" href="https://github.com/OCA/timesheet/tree/17.0/sale_timesheet_line_exclude">OCA/timesheet</a> project on GitHub.</p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/timesheet/tree/18.0/sale_timesheet_line_exclude">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>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ def setUp(self):
self.SudoSaleOrder = self.SaleOrder.sudo()
self.SaleOrderLine = self.env["sale.order.line"]
self.SudoSaleOrderLine = self.SaleOrderLine.sudo()
self.ProjectCreateSaleOrder = self.env["project.create.sale.order"]

self.analytic_plan = self.AccountAccountPlan.create(
{
Expand Down Expand Up @@ -57,7 +56,7 @@ def setUp(self):
{
"name": "Project #1",
"allow_timesheets": True,
"analytic_account_id": self.analytic_account_sale.id,
"account_id": self.analytic_account_sale.id,
"allow_billable": True,
}
)
Expand Down Expand Up @@ -135,7 +134,7 @@ def test_create_without_exclude_from_sale_order(self):
"name": "Entry #1-1",
"unit_amount": 1,
"employee_id": self.employee.id,
"account_id": self.project.analytic_account_id.id,
"account_id": self.project.account_id.id,
}
)
self.assertEqual(timesheet.timesheet_invoice_type, "billable_time")
Expand All @@ -152,7 +151,7 @@ def test_create_with_exclude_from_sale_order(self):
"unit_amount": 1,
"employee_id": self.employee.id,
"exclude_from_sale_order": True,
"account_id": self.project.analytic_account_id.id,
"account_id": self.project.account_id.id,
}
)
self.assertEqual(timesheet.timesheet_invoice_type, "non_billable")
Expand All @@ -169,7 +168,7 @@ def test_write_exclude_from_sale_order(self):
"unit_amount": 1,
"employee_id": self.employee.id,
"exclude_from_sale_order": False,
"account_id": self.project.analytic_account_id.id,
"account_id": self.project.account_id.id,
}
)
timesheet.write({"exclude_from_sale_order": True})
Expand All @@ -188,7 +187,7 @@ def test_write_remove_exclude_from_sale_order(self):
"unit_amount": 1,
"employee_id": self.employee.id,
"exclude_from_sale_order": True,
"account_id": self.project.analytic_account_id.id,
"account_id": self.project.account_id.id,
}
)
timesheet.write({"exclude_from_sale_order": False})
Expand All @@ -207,7 +206,7 @@ def test_create_invoice(self):
"name": "Entry #1-1",
"unit_amount": 1,
"employee_id": self.employee.id,
"account_id": self.project.analytic_account_id.id,
"account_id": self.project.account_id.id,
}
)

Expand All @@ -219,7 +218,7 @@ def test_create_invoice(self):
"unit_amount": 1,
"employee_id": self.employee.id,
"exclude_from_sale_order": True,
"account_id": self.project.analytic_account_id.id,
"account_id": self.project.account_id.id,
}
)

Expand All @@ -242,7 +241,7 @@ def test_write_invoiced(self):
"name": "Entry #1-1",
"unit_amount": 1,
"employee_id": self.employee.id,
"account_id": self.project.analytic_account_id.id,
"account_id": self.project.account_id.id,
}
)

Expand All @@ -254,7 +253,7 @@ def test_write_invoiced(self):
"unit_amount": 1,
"employee_id": self.employee.id,
"exclude_from_sale_order": True,
"account_id": self.project.analytic_account_id.id,
"account_id": self.project.account_id.id,
}
)

Expand All @@ -280,7 +279,7 @@ def test_1(self):
"name": "Entry #1-1",
"unit_amount": 1,
"employee_id": self.employee.id,
"account_id": self.project.analytic_account_id.id,
"account_id": self.project.account_id.id,
}
)
timesheet2 = self.SudoAccountAnalyticLine.create(
Expand All @@ -291,7 +290,7 @@ def test_1(self):
"unit_amount": 1,
"employee_id": self.employee.id,
"exclude_from_sale_order": False,
"account_id": self.project.analytic_account_id.id,
"account_id": self.project.account_id.id,
}
)

Expand All @@ -308,7 +307,7 @@ def test_1(self):
"name": "Entry #1-3",
"unit_amount": 1,
"employee_id": self.employee.id,
"account_id": self.project.analytic_account_id.id,
"account_id": self.project.account_id.id,
}
)
self.assertEqual(timesheet3.timesheet_invoice_type, "billable_time")
Expand Down
2 changes: 1 addition & 1 deletion sale_timesheet_line_exclude/views/project_task.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
/>
<field name="arch" type="xml">
<xpath
expr="//field[@name='timesheet_ids']/tree/field[@name='so_line']"
expr="//field[@name='timesheet_ids']/list/field[@name='so_line']"
position="before"
>
<field name="exclude_from_sale_order" />
Expand Down

0 comments on commit 0b76d81

Please sign in to comment.