1 Commits

Author SHA1 Message Date
Stéphan Sainléger
5b9f0d288d [ADD] add `project_timesheet_funding_wish` addon
adds in the timesheet lines:
- ``funding wish`` field: user tells if we want to be paid for the
time spent
- ``treated`` field: tells if the timesheet line has been considered
in internal invoicing process

Task: JOI-13
2022-07-26 10:00:07 +02:00
12 changed files with 119 additions and 114 deletions

View File

@@ -1,48 +0,0 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * project_assignees
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 14.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-07-26 07:38+0000\n"
"PO-Revision-Date: 2022-07-26 07:38+0000\n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: project_assignees
#: model:ir.model.fields,field_description:project_assignees.field_project_task__assignee_ids
msgid "Assignees"
msgstr "Assignée à"
#. module: project_assignees
#: model:ir.model.fields,field_description:project_assignees.field_project_task__display_name
msgid "Display Name"
msgstr "Nom affiché"
#. module: project_assignees
#: model:ir.model.fields,field_description:project_assignees.field_project_task__id
msgid "ID"
msgstr ""
#. module: project_assignees
#: model:ir.model.fields,field_description:project_assignees.field_project_task____last_update
msgid "Last Modified on"
msgstr "Dernière modification le"
#. module: project_assignees
#: code:addons/project_assignees/models/project_task.py:0
#: model:ir.model.fields,field_description:project_assignees.field_project_task__user_id
#, python-format
msgid "Owner"
msgstr "Demandée par"
#. module: project_assignees
#: model:ir.model,name:project_assignees.model_project_task
msgid "Task"
msgstr "Tâche"

View File

@@ -1,2 +0,0 @@
from . import project_task

View File

@@ -1,10 +0,0 @@
from odoo import models, fields, _
class Task(models.Model):
_inherit = "project.task"
user_id = fields.Many2one(string=_("Owner"))
assignee_ids = fields.Many2many('res.users', 'assignee_ids_rel', string='Assignees')

View File

@@ -1,26 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<odoo>
<record id="view_task_form2_assignees" model="ir.ui.view">
<field name="name">project.task.form.assignees</field>
<field name="model">project.task</field>
<field name="inherit_id" ref="project.view_task_form2" />
<field name="priority" eval="99" />
<field name="arch" type="xml">
<xpath expr="//field[@name='user_id']" position="after">
<field name="assignee_ids" widget="many2many_tags" />
</xpath>
</field>
</record>
<record id="view_task_search_form_assignees" model="ir.ui.view">
<field name="name">project.task.search.form.assignees</field>
<field name="model">project.task</field>
<field name="inherit_id" ref="project.view_task_search_form" />
<field name="priority" eval="99" />
<field name="arch" type="xml">
<filter name="my_tasks" position="attributes">
<attribute name="domain">['|', ('user_id', '=', uid), ('assignee_ids', 'in', uid)]</attribute>
</filter>
</field>
</record>
</odoo>

View File

@@ -1,14 +1,14 @@
================= ==============================
project_assignees project_timesheet_funding_wish
================= ==============================
Add multiple assignees field to project task Add a funding wish select field to timesheet line.
Installation Installation
============ ============
Use Odoo normal procedure to install add-ons to install Use Odoo normal procedure to install add-ons to install
``project_assignees``. ``project_timesheet_funding_wish``.
Known issues / Roadmap Known issues / Roadmap
====================== ======================
@@ -16,9 +16,8 @@ Known issues / Roadmap
Bug Tracker Bug Tracker
=========== ===========
Bugs are tracked on `our issues website Bugs are tracked on `our issues website <https://github.com/elabore-coop/project-tools/issues>`_. In
<https://github.com/elabore-coop/project-tools/issues>`_. In case of case of trouble, please check there if your issue has already been
trouble, please check there if your issue has already been
reported. If you spotted it first, help us smashing it by providing a reported. If you spotted it first, help us smashing it by providing a
detailed and welcomed feedback. detailed and welcomed feedback.
@@ -32,6 +31,8 @@ Images
Contributors Contributors
------------ ------------
* Stéphan Sainléger <https://github.com/stephansainleger> * Stéphan Sainléger <https://github.com/stephansainleger>
* Valentin Lab <valentin.lab@kalysto.org>
* Nicolas Jeudy <https://github.com/njeudy>
Funders Funders
------- -------
@@ -41,5 +42,6 @@ The development of this module has been financially supported by:
Maintainer Maintainer
---------- ----------
This module is maintained by Elabore. This module is maintained by Elabore.

View File

@@ -2,40 +2,38 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{ {
"name": "project_assignees", "name": "project_timesheet_funding_wish",
"version": "14.0.0.1.0", "version": "14.0.1.0.0",
"author": "Elabore", "author": "Elabore",
"website": "https://github.com/elabore-coop/project-tools", "website": "https://github.com/elabore-coop/project-tools",
"maintainer": "Stéphan Sainléger", "maintainer": "Stéphan Sainléger",
"license": "AGPL-3", "license": "AGPL-3",
"category": "Tools", "category": "Tools",
"summary": "Add multiple assignees field to project task", "summary": "Add a funding wish select field to timesheet line.",
"description": """ "description": """
:image: https://img.shields.io/badge/licence-AGPL--3-blue.svg :image: https://img.shields.io/badge/licence-AGPL--3-blue.svg
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3 :alt: License: AGPL-3
================= ==============================
project_assignees project_timesheet_funding_wish
================= ==============================
Add multiple assignees field to project task. Add a funding wish select field to timesheet line.
Installation Installation
============ ============
Install ``project_assignees``, all dependencies will be installed by default. Use Odoo normal procedure to install add-ons to install
``project_timesheet_funding_wish``.
Known issues / Roadmap Known issues / Roadmap
====================== ======================
None yet.
Bug Tracker Bug Tracker
=========== ===========
Bugs are tracked on `our issues website Bugs are tracked on `our issues website <https://github.com/elabore-coop/project-tools/issues>`_. In
<https://github.com/elabore-coop/project-tools/issues>`_. In case of case of trouble, please check there if your issue has already been
trouble, please check there if your issue has already been
reported. If you spotted it first, help us smashing it by providing a reported. If you spotted it first, help us smashing it by providing a
detailed and welcomed feedback. detailed and welcomed feedback.
@@ -44,18 +42,16 @@ Credits
Images Images
------ ------
* Elabore: `Icon <https://elabore.coop/web/image/res.company/1/logo?unique=f3db262>`_. * Elabore: `Icon <https://elabore.coop/web/image/res.company/1/logo?unique=f3db262>`_.
Contributors Contributors
------------ ------------
* Stéphan Sainléger <https://github.com/stephansainleger> * Stéphan Sainléger <https://github.com/stephansainleger>
* Valentin Lab <valentin.lab@kalysto.org> * Valentin Lab <valentin.lab@kalysto.org>
* Nicolas Jeudy <https://github.com/njeudy>
Funders Funders
------- -------
The development of this module has been financially supported by: The development of this module has been financially supported by:
* Elabore (https://elabore.coop) * Elabore (https://elabore.coop)
@@ -68,7 +64,7 @@ This module is maintained by Elabore.
# any module necessary for this one to work correctly # any module necessary for this one to work correctly
"depends": [ "depends": [
"base", "base",
"project", "hr_timesheet",
], ],
"qweb": [ "qweb": [
# "static/src/xml/*.xml", # "static/src/xml/*.xml",
@@ -78,7 +74,7 @@ This module is maintained by Elabore.
}, },
# always loaded # always loaded
"data": [ "data": [
"views/project_task.xml", "views/hr_timesheet.xml",
], ],
# only loaded in demonstration mode # only loaded in demonstration mode
"demo": [], "demo": [],

View File

@@ -0,0 +1,65 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * project_timesheet_funding_wish
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 14.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-07-25 17:02+0000\n"
"PO-Revision-Date: 2022-07-25 17:02+0000\n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: project_timesheet_funding_wish
#: model:ir.model,name:project_timesheet_funding_wish.model_account_analytic_line
msgid "Analytic Line"
msgstr "Ligne analytique"
#. module: project_timesheet_funding_wish
#: model:ir.model.fields,field_description:project_timesheet_funding_wish.field_account_analytic_line__display_name
msgid "Display Name"
msgstr "Nom affiché"
#. module: project_timesheet_funding_wish
#: model:ir.model.fields.selection,name:project_timesheet_funding_wish.selection__account_analytic_line__funding_wish__free
msgid "Free"
msgstr "Offert"
#. module: project_timesheet_funding_wish
#: code:addons/project_timesheet_funding_wish/models/hr_timesheet.py:0
#: model:ir.model.fields,field_description:project_timesheet_funding_wish.field_account_analytic_line__funding_wish
#, python-format
msgid "Funding wish"
msgstr "Type de financement"
#. module: project_timesheet_funding_wish
#: model:ir.model.fields,field_description:project_timesheet_funding_wish.field_account_analytic_line__id
msgid "ID"
msgstr ""
#. module: project_timesheet_funding_wish
#: model:ir.model.fields,field_description:project_timesheet_funding_wish.field_account_analytic_line____last_update
msgid "Last Modified on"
msgstr "Dernière modification le"
#. module: project_timesheet_funding_wish
#: model:ir.model.fields.selection,name:project_timesheet_funding_wish.selection__account_analytic_line__funding_wish__accepted
msgid "Payment accepted"
msgstr "Paiement accepté"
#. module: project_timesheet_funding_wish
#: model:ir.model.fields.selection,name:project_timesheet_funding_wish.selection__account_analytic_line__funding_wish__expected
msgid "Payment expected"
msgstr "Paiement attendu"
#. module: project_timesheet_funding_wish
#: code:addons/project_timesheet_funding_wish/models/hr_timesheet.py:0
#: model:ir.model.fields,field_description:project_timesheet_funding_wish.field_account_analytic_line__treated
#, python-format
msgid "Treated"
msgstr "Traité"

View File

@@ -0,0 +1,3 @@
# -*- coding: utf-8 -*-
from . import hr_timesheet

View File

@@ -0,0 +1,11 @@
# -*- coding: utf-8 -*-
from odoo import _, fields, models
class AccountAnalyticLine(models.Model):
_inherit = 'account.analytic.line'
funding_wish = fields.Selection([("free", "Free"),("accepted", "Payment accepted"),("expected", "Payment expected")], string=_("Funding wish"), copy=False)
treated = fields.Boolean(string=_("Treated"), copy=False)

View File

@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="hr_timesheet_line_tree_funding_view" model="ir.ui.view">
<field name="name">hr.timesheet.line.tree.funding.view</field>
<field name="model">account.analytic.line</field>
<field name="inherit_id" ref="hr_timesheet.hr_timesheet_line_tree" />
<field name="arch" type="xml">
<xpath expr="//field[@name='date']" position="after">
<field name="treated" />
<field name="funding_wish" />
</xpath>
</field>
</record>
</odoo>