Skip to content

Commit

Permalink
[MIG] analytic_partner_hr_timesheet: Migration to 14.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Ernesto Tejeda committed Jan 18, 2022
1 parent a153134 commit e38d260
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 36 deletions.
19 changes: 11 additions & 8 deletions analytic_partner_hr_timesheet/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ Partner in HR timesheets
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Faccount--analytic-lightgray.png?logo=github
:target: https://github.com/OCA/account-analytic/tree/12.0/analytic_partner_hr_timesheet
:target: https://github.com/OCA/account-analytic/tree/14.0/analytic_partner_hr_timesheet
:alt: OCA/account-analytic
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/account-analytic-12-0/account-analytic-12-0-analytic_partner_hr_timesheet
:target: https://translation.odoo-community.org/projects/account-analytic-14-0/account-analytic-14-0-analytic_partner_hr_timesheet
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
:target: https://runbot.odoo-community.org/runbot/87/12.0
:target: https://runbot.odoo-community.org/runbot/87/14.0
:alt: Try me on Runbot

|badge1| |badge2| |badge3| |badge4| |badge5|
Expand Down Expand Up @@ -54,7 +54,7 @@ Bug Tracker
Bugs are tracked on `GitHub Issues <https://github.com/OCA/account-analytic/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed
`feedback <https://github.com/OCA/account-analytic/issues/new?body=module:%20analytic_partner_hr_timesheet%0Aversion:%2012.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
`feedback <https://github.com/OCA/account-analytic/issues/new?body=module:%20analytic_partner_hr_timesheet%0Aversion:%2014.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 @@ -71,10 +71,13 @@ Contributors

* `Tecnativa <https://www.tecnativa.com>`_:

* Pedro M. Baeza <[email protected]>
* Rafael Blasco <[email protected]>
* Luis M. Ontalba <[email protected]>
* `Tecnativa <https://www.tecnativa.com>`_:

* Pedro M. Baeza
* Rafael Blasco
* Luis M. Ontalba
* Carlos Dauden
* Ernesto Tejeda

Maintainers
~~~~~~~~~~~
Expand All @@ -89,6 +92,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/account-analytic <https://github.com/OCA/account-analytic/tree/12.0/analytic_partner_hr_timesheet>`_ project on GitHub.
This module is part of the `OCA/account-analytic <https://github.com/OCA/account-analytic/tree/14.0/analytic_partner_hr_timesheet>`_ project on GitHub.

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

{
"name": "Partner in HR timesheets",
"version": "12.0.1.1.0",
"version": "14.0.1.0.0",
"summary": "Classify HR activities by partner",
"category": "Human Resources",
"author": "Tecnativa, " "Odoo Community Association (OCA)",
"author": "Tecnativa, Odoo Community Association (OCA)",
"license": "AGPL-3",
"website": "https://github.com/OCA/account-analytic",
"depends": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ class AnalyticAccountLine(models.Model):
_inherit = "account.analytic.line"

@api.onchange("project_id")
def onchange_project_id(self):
def _onchange_project_id(self):
if self.project_id:
self.partner_id = self.project_id.partner_id.id
return super()._onchange_project_id()
9 changes: 6 additions & 3 deletions analytic_partner_hr_timesheet/readme/CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
* `Tecnativa <https://www.tecnativa.com>`_:

* Pedro M. Baeza <[email protected]>
* Rafael Blasco <[email protected]>
* Luis M. Ontalba <[email protected]>
* `Tecnativa <https://www.tecnativa.com>`_:

* Pedro M. Baeza
* Rafael Blasco
* Luis M. Ontalba
* Carlos Dauden
* Ernesto Tejeda
44 changes: 23 additions & 21 deletions analytic_partner_hr_timesheet/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.15.1: http://docutils.sourceforge.net/" />
<meta name="generator" content="Docutils: http://docutils.sourceforge.net/" />
<title>Partner in HR timesheets</title>
<style type="text/css">

Expand Down Expand Up @@ -367,71 +367,73 @@ <h1 class="title">Partner in HR timesheets</h1>
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external" 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" 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" href="https://github.com/OCA/account-analytic/tree/12.0/analytic_partner_hr_timesheet"><img alt="OCA/account-analytic" src="https://img.shields.io/badge/github-OCA%2Faccount--analytic-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/account-analytic-12-0/account-analytic-12-0-analytic_partner_hr_timesheet"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runbot.odoo-community.org/runbot/87/12.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
<p><a class="reference external" 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" 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" href="https://github.com/OCA/account-analytic/tree/14.0/analytic_partner_hr_timesheet"><img alt="OCA/account-analytic" src="https://img.shields.io/badge/github-OCA%2Faccount--analytic-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/account-analytic-14-0/account-analytic-14-0-analytic_partner_hr_timesheet"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runbot.odoo-community.org/runbot/87/14.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
<p>This module adds another partner on HR timesheets and propagate it to the
auto-generated analytic entries on the “Other partner” field.</p>
<p><strong>Table of contents</strong></p>
<div class="contents local topic" id="contents">
<ul class="simple">
<li><a class="reference internal" href="#installation" id="id1">Installation</a></li>
<li><a class="reference internal" href="#usage" id="id2">Usage</a></li>
<li><a class="reference internal" href="#bug-tracker" id="id3">Bug Tracker</a></li>
<li><a class="reference internal" href="#credits" id="id4">Credits</a><ul>
<li><a class="reference internal" href="#authors" id="id5">Authors</a></li>
<li><a class="reference internal" href="#contributors" id="id6">Contributors</a></li>
<li><a class="reference internal" href="#maintainers" id="id7">Maintainers</a></li>
<li><a class="reference internal" href="#installation" id="id2">Installation</a></li>
<li><a class="reference internal" href="#usage" id="id3">Usage</a></li>
<li><a class="reference internal" href="#bug-tracker" id="id4">Bug Tracker</a></li>
<li><a class="reference internal" href="#credits" id="id5">Credits</a><ul>
<li><a class="reference internal" href="#authors" id="id6">Authors</a></li>
<li><a class="reference internal" href="#contributors" id="id7">Contributors</a></li>
<li><a class="reference internal" href="#maintainers" id="id8">Maintainers</a></li>
</ul>
</li>
</ul>
</div>
<div class="section" id="installation">
<h1><a class="toc-backref" href="#id1">Installation</a></h1>
<h1><a class="toc-backref" href="#id2">Installation</a></h1>
<p>This module is auto-installed by Odoo when <em>analytic_partner</em> and
<em>hr_timesheet</em> are installed.</p>
</div>
<div class="section" id="usage">
<h1><a class="toc-backref" href="#id2">Usage</a></h1>
<h1><a class="toc-backref" href="#id3">Usage</a></h1>
<p>Go to Timesheets &gt; My Timesheet &gt; Detailed Activities, and you will find there
the partner field. You can set it, search for it or group by it.</p>
<p>You can also go to a partner, and click on the smart-button “Activities” to
see, edit or add the related timesheet activities.</p>
</div>
<div class="section" id="bug-tracker">
<h1><a class="toc-backref" href="#id3">Bug Tracker</a></h1>
<h1><a class="toc-backref" href="#id4">Bug Tracker</a></h1>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/account-analytic/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 smashing it by providing a detailed and welcomed
<a class="reference external" href="https://github.com/OCA/account-analytic/issues/new?body=module:%20analytic_partner_hr_timesheet%0Aversion:%2012.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/account-analytic/issues/new?body=module:%20analytic_partner_hr_timesheet%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="#id4">Credits</a></h1>
<h1><a class="toc-backref" href="#id5">Credits</a></h1>
<div class="section" id="authors">
<h2><a class="toc-backref" href="#id5">Authors</a></h2>
<h2><a class="toc-backref" href="#id6">Authors</a></h2>
<ul class="simple">
<li>Tecnativa</li>
</ul>
</div>
<div class="section" id="contributors">
<h2><a class="toc-backref" href="#id6">Contributors</a></h2>
<h2><a class="toc-backref" href="#id7">Contributors</a></h2>
<ul class="simple">
<li><a class="reference external" href="https://www.tecnativa.com">Tecnativa</a>:</li>
<li><a class="reference external" href="https://www.tecnativa.com">Tecnativa</a>:<ul>
<li>Pedro M. Baeza &lt;<a class="reference external" href="mailto:pedro.baeza&#64;tecnativa.com">pedro.baeza&#64;tecnativa.com</a>&gt;</li>
<li>Rafael Blasco &lt;<a class="reference external" href="mailto:rafael.blasco&#64;tecnativa.com">rafael.blasco&#64;tecnativa.com</a>&gt;</li>
<li>Luis M. Ontalba &lt;<a class="reference external" href="mailto:luis.martinez&#64;tecnativa.com">luis.martinez&#64;tecnativa.com</a>&gt;</li>
<li>Pedro M. Baeza</li>
<li>Rafael Blasco</li>
<li>Luis M. Ontalba</li>
<li>Carlos Dauden</li>
<li>Ernesto Tejeda</li>
</ul>
</li>
</ul>
</div>
<div class="section" id="maintainers">
<h2><a class="toc-backref" href="#id7">Maintainers</a></h2>
<h2><a class="toc-backref" href="#id8">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
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/account-analytic/tree/12.0/analytic_partner_hr_timesheet">OCA/account-analytic</a> project on GitHub.</p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/account-analytic/tree/14.0/analytic_partner_hr_timesheet">OCA/account-analytic</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 @@ -45,7 +45,7 @@ def setUpClass(cls):

def test_onchange_project_id(self):
self.line.project_id = self.project.id
self.line.onchange_project_id()
self.line._onchange_project_id()
self.assertEqual(self.line.partner_id, self.line.project_id.partner_id)

def test_compute_timesheet_count(self):
Expand Down

0 comments on commit e38d260

Please sign in to comment.