Skip to content

Commit

Permalink
Merge PR #627 into 14.0
Browse files Browse the repository at this point in the history
Signed-off-by ilyasProgrammer
  • Loading branch information
OCA-git-bot committed Jan 10, 2024
2 parents 6dd36b7 + c82a151 commit c3a44a1
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 25 deletions.
13 changes: 8 additions & 5 deletions sale_timesheet_order_line_no_update/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,20 @@ In project > invoicing, updating field "Default Sales Order Item" updates new fi

It also allows to select in both project and tasks a Sale order item from a different SO than the one set in project configuration.

**Table of contents**

.. contents::
:local:

Use Cases / Context
===================

Use case:

A new "timesheet hours" line is added to SO related to project (or to a new SO for same customer), but hours on the previous SO line have not all been billed yet.

This module allows to add new timesheet lines related to the new SO item, while keeping the previously inputted hours related to the previous SO item.

**Table of contents**

.. contents::
:local:

Bug Tracker
===========

Expand Down
8 changes: 7 additions & 1 deletion sale_timesheet_order_line_no_update/models/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,15 @@ class ProjectTask(models.Model):
copy=False,
)
hide_original_sol = fields.Boolean()

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

def default_get(self, fields):
vals = super(ProjectTask, self).default_get(fields)
if vals.get("project_id"):
project = self.env["project.project"].browse(vals["project_id"])
vals["new_sale_line_id"] = project.sale_line_id.id
return vals


class ProjectProject(models.Model):
_inherit = "project.project"
Expand Down
5 changes: 5 additions & 0 deletions sale_timesheet_order_line_no_update/readme/CONTEXT.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Use case:

A new "timesheet hours" line is added to SO related to project (or to a new SO for same customer), but hours on the previous SO line have not all been billed yet.

This module allows to add new timesheet lines related to the new SO item, while keeping the previously inputted hours related to the previous SO item.
6 changes: 0 additions & 6 deletions sale_timesheet_order_line_no_update/readme/DESCRIPTION.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,3 @@ This module allows to set which Sale order item to use for new timesheets in a s
In project > invoicing, updating field "Default Sales Order Item" updates new field "Default sale order item" in all tasks.

It also allows to select in both project and tasks a Sale order item from a different SO than the one set in project configuration.

Use case:

A new "timesheet hours" line is added to SO related to project (or to a new SO for same customer), but hours on the previous SO line have not all been billed yet.

This module allows to add new timesheet lines related to the new SO item, while keeping the previously inputted hours related to the previous SO item.
30 changes: 17 additions & 13 deletions sale_timesheet_order_line_no_update/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -372,40 +372,44 @@ <h1 class="title">Sale Timesheet Order Line no Update</h1>
<p>This module allows to set which Sale order item to use for new timesheets in a specific task, without updating the related Sale order item for all the existing timesheets in that task. This value can be set in field “Default sale order item” in the task itself.</p>
<p>In project &gt; invoicing, updating field “Default Sales Order Item” updates new field “Default sale order item” in all tasks.</p>
<p>It also allows to select in both project and tasks a Sale order item from a different SO than the one set in project configuration.</p>
<p>Use case:</p>
<p>A new “timesheet hours” line is added to SO related to project (or to a new SO for same customer), but hours on the previous SO line have not all been billed yet.</p>
<p>This module allows to add new timesheet lines related to the new SO item, while keeping the previously inputted hours related to the previous SO item.</p>
<p><strong>Table of contents</strong></p>
<div class="contents local topic" id="contents">
<ul class="simple">
<li><a class="reference internal" href="#bug-tracker" id="toc-entry-1">Bug Tracker</a></li>
<li><a class="reference internal" href="#credits" id="toc-entry-2">Credits</a><ul>
<li><a class="reference internal" href="#authors" id="toc-entry-3">Authors</a></li>
<li><a class="reference internal" href="#contributors" id="toc-entry-4">Contributors</a></li>
<li><a class="reference internal" href="#maintainers" id="toc-entry-5">Maintainers</a></li>
<li><a class="reference internal" href="#use-cases-context" id="toc-entry-1">Use Cases / Context</a></li>
<li><a class="reference internal" href="#bug-tracker" id="toc-entry-2">Bug Tracker</a></li>
<li><a class="reference internal" href="#credits" id="toc-entry-3">Credits</a><ul>
<li><a class="reference internal" href="#authors" id="toc-entry-4">Authors</a></li>
<li><a class="reference internal" href="#contributors" id="toc-entry-5">Contributors</a></li>
<li><a class="reference internal" href="#maintainers" id="toc-entry-6">Maintainers</a></li>
</ul>
</li>
</ul>
</div>
<div class="section" id="use-cases-context">
<h1><a class="toc-backref" href="#toc-entry-1">Use Cases / Context</a></h1>
<p>Use case:</p>
<p>A new “timesheet hours” line is added to SO related to project (or to a new SO for same customer), but hours on the previous SO line have not all been billed yet.</p>
<p>This module allows to add new timesheet lines related to the new SO item, while keeping the previously inputted hours related to the previous SO item.</p>
</div>
<div class="section" id="bug-tracker">
<h1><a class="toc-backref" href="#toc-entry-1">Bug Tracker</a></h1>
<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_order_line_no_update%0Aversion:%2014.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-2">Credits</a></h1>
<h1><a class="toc-backref" href="#toc-entry-3">Credits</a></h1>
<div class="section" id="authors">
<h2><a class="toc-backref" href="#toc-entry-3">Authors</a></h2>
<h2><a class="toc-backref" href="#toc-entry-4">Authors</a></h2>
<ul class="simple">
<li>Ilyas</li>
<li>Ooops404</li>
</ul>
</div>
<div class="section" id="contributors">
<h2><a class="toc-backref" href="#toc-entry-4">Contributors</a></h2>
<h2><a class="toc-backref" href="#toc-entry-5">Contributors</a></h2>
<ul class="simple">
<li>Ooops404 &lt;<a class="reference external" href="https://ooops404.com">https://ooops404.com</a>&gt;<ul>
<li>Ilyas &lt;<a class="reference external" href="mailto:irazor147&#64;gmail.com">irazor147&#64;gmail.com</a>&gt;</li>
Expand All @@ -414,7 +418,7 @@ <h2><a class="toc-backref" href="#toc-entry-4">Contributors</a></h2>
</ul>
</div>
<div class="section" id="maintainers">
<h2><a class="toc-backref" href="#toc-entry-5">Maintainers</a></h2>
<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>
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
Expand Down

0 comments on commit c3a44a1

Please sign in to comment.