Skip to content

Commit

Permalink
[MIG] sale_timesheet_invoice_description: Migration to 17.0
Browse files Browse the repository at this point in the history
[FIX] Fix error set description to empty
  • Loading branch information
mario committed Apr 29, 2024
1 parent 2231821 commit 72802f8
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 17 deletions.
10 changes: 5 additions & 5 deletions sale_timesheet_invoice_description/README.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
=========================
Timesheet details invoice
=========================
=====================================
Timesheet details invoice description
=====================================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Expand Down Expand Up @@ -58,7 +58,7 @@ To use this module, you need to:

2. Go to *Sales > Orders > Orders*, select a Sale Order or create a new
one, add a product (service) under 'Order Lines' tab.
3. Go to 'Other Info' tab (wihthin the same Sale Order) and:
3. Go to 'Other Info' tab (within the same Sale Order) and:

- Select an option from **Timesheet Invoice Description**.
- Tick off **Split Order lines by timesheets**, if you want to
Expand All @@ -70,7 +70,7 @@ To use this module, you need to:
(timesheet line) and select a task related to the Sale Order's
project (and to your specific Sale Order's line). Remember to add the
time spent.
6. Go to the Sale Order and create its invoice (clic on 'Create
6. Go to the Sale Order and create its invoice (click on 'Create
Invoice').

Bug Tracker
Expand Down
2 changes: 1 addition & 1 deletion sale_timesheet_invoice_description/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

{
"name": "Timesheet details invoice",
"name": "Timesheet details invoice description",
"summary": "Add timesheet details in invoice line",
"version": "17.0.1.0.0",
"category": "Sales Management",
Expand Down
4 changes: 2 additions & 2 deletions sale_timesheet_invoice_description/readme/USAGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ To use this module, you need to:
- **Unit of Measure** \> 'Hours' (or any other time unit)
2. Go to *Sales \> Orders \> Orders*, select a Sale Order or create a
new one, add a product (service) under 'Order Lines' tab.
3. Go to 'Other Info' tab (wihthin the same Sale Order) and:
3. Go to 'Other Info' tab (within the same Sale Order) and:
- Select an option from **Timesheet Invoice Description**.
- Tick off **Split Order lines by timesheets**, if you want to
create an invoice line per each Sale Order timesheet's line.
Expand All @@ -18,5 +18,5 @@ To use this module, you need to:
(timesheet line) and select a task related to the Sale Order's
project (and to your specific Sale Order's line). Remember to add
the time spent.
6. Go to the Sale Order and create its invoice (clic on 'Create
6. Go to the Sale Order and create its invoice (click on 'Create
Invoice').
10 changes: 5 additions & 5 deletions sale_timesheet_invoice_description/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils: https://docutils.sourceforge.io/" />
<title>Timesheet details invoice</title>
<title>Timesheet details invoice description</title>
<style type="text/css">

/*
Expand Down Expand Up @@ -360,8 +360,8 @@
</style>
</head>
<body>
<div class="document" id="timesheet-details-invoice">
<h1 class="title">Timesheet details invoice</h1>
<div class="document" id="timesheet-details-invoice-description">
<h1 class="title">Timesheet details invoice description</h1>

<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
Expand Down Expand Up @@ -407,7 +407,7 @@ <h1><a class="toc-backref" href="#toc-entry-2">Usage</a></h1>
</li>
<li>Go to <em>Sales &gt; Orders &gt; Orders</em>, select a Sale Order or create a new
one, add a product (service) under ‘Order Lines’ tab.</li>
<li>Go to ‘Other Info’ tab (wihthin the same Sale Order) and:<ul>
<li>Go to ‘Other Info’ tab (within the same Sale Order) and:<ul>
<li>Select an option from <strong>Timesheet Invoice Description</strong>.</li>
<li>Tick off <strong>Split Order lines by timesheets</strong>, if you want to
create an invoice line per each Sale Order timesheet’s line.</li>
Expand All @@ -419,7 +419,7 @@ <h1><a class="toc-backref" href="#toc-entry-2">Usage</a></h1>
(timesheet line) and select a task related to the Sale Order’s
project (and to your specific Sale Order’s line). Remember to add the
time spent.</li>
<li>Go to the Sale Order and create its invoice (clic on ‘Create
<li>Go to the Sale Order and create its invoice (click on ‘Create
Invoice’).</li>
</ol>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,26 @@
from odoo.tests import common
from odoo.tools.float_utils import float_compare

from odoo.addons.base.tests.common import DISABLED_MAIL_CONTEXT


class TestSaleTimesheetDescription(common.TransactionCase):
@classmethod
def setUpClass(cls):
super().setUpClass()
cls.env = cls.env(context=dict(cls.env.context, **DISABLED_MAIL_CONTEXT))
# Make sure user is in English
cls.env.user.lang = "en_US"
cls.partner = cls.env["res.partner"].create({"name": "Test partner"})
cls.default_applicability = cls.env["account.analytic.applicability"].create(
{
"business_domain": "general",
"applicability": "optional",
"company_id": False,
}
)
cls.default_plan = cls.env["account.analytic.plan"].create(
{"name": "Default", "company_id": False}
{"name": "Default", "applicability_ids": cls.default_applicability.ids}
)
cls.analytic_account = cls.env["account.analytic.account"].create(
{
Expand Down
7 changes: 5 additions & 2 deletions sale_timesheet_invoice_description/views/res_config_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,18 @@
<field name="model">res.config.settings</field>
<field name="inherit_id" ref="sale_timesheet.res_config_settings_view_form" />
<field name="arch" type="xml">
<xpath expr="//div[@name='msg_module_sale_timesheet']" position="after">
<xpath expr="//setting[@id='time_billing_setting']/button" position="after">
<div class="content-group" name="sale_timesheet_invoice_description">
<div class="mt16">
<label for="default_timesheet_invoice_description" />
<div class="text-muted">
Default timesheet details on invoice lines
</div>
<div class="text-muted">
<field name="default_timesheet_invoice_description" />
<field
name="default_timesheet_invoice_description"
required="1"
/>
</div>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion sale_timesheet_invoice_description/views/sale_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<field name="inherit_id" ref="sale.view_order_form" />
<field name="arch" type="xml">
<field name="show_update_fpos" position="after">
<field name="timesheet_invoice_description" />
<field name="timesheet_invoice_description" required="1" />
<field name="timesheet_invoice_split" />
</field>
</field>
Expand Down

0 comments on commit 72802f8

Please sign in to comment.