[ADD] create `project_user_default_project
` add-on
This commit is contained in:
2
project_user_default_project/.gitignore
vendored
Normal file
2
project_user_default_project/.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
*.*~
|
||||
*pyc
|
44
project_user_default_project/README.rst
Normal file
44
project_user_default_project/README.rst
Normal file
@@ -0,0 +1,44 @@
|
||||
============================
|
||||
project_user_default_project
|
||||
============================
|
||||
|
||||
Add default project field in user model
|
||||
|
||||
Installation
|
||||
============
|
||||
|
||||
Use Odoo normal module installation procedure to install
|
||||
``project_user_default_project``.
|
||||
|
||||
Known issues / Roadmap
|
||||
======================
|
||||
|
||||
None yet.
|
||||
|
||||
Bug Tracker
|
||||
===========
|
||||
|
||||
Bugs are tracked on `our issues website <https://github.com/elabore-coop/project-tools/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.
|
||||
|
||||
Credits
|
||||
=======
|
||||
|
||||
Contributors
|
||||
------------
|
||||
|
||||
* Stéphan Sainléger
|
||||
|
||||
Funders
|
||||
-------
|
||||
|
||||
The development of this module has been financially supported by:
|
||||
* Elabore (https://elabore.coop)
|
||||
|
||||
|
||||
Maintainer
|
||||
----------
|
||||
|
||||
This module is maintained by Elabore.
|
3
project_user_default_project/__init__.py
Normal file
3
project_user_default_project/__init__.py
Normal file
@@ -0,0 +1,3 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from . import models
|
86
project_user_default_project/__manifest__.py
Normal file
86
project_user_default_project/__manifest__.py
Normal file
@@ -0,0 +1,86 @@
|
||||
# Copyright 2022 Stéphan Sainléger (Elabore)
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
{
|
||||
"name": "project_user_default_project",
|
||||
"version": "14.0.1.0.0",
|
||||
"author": "Elabore",
|
||||
"website": "https://elabore.coop",
|
||||
"maintainer": "Stéphan Sainléger",
|
||||
"license": "AGPL-3",
|
||||
"category": "Tools",
|
||||
"summary": "Add default project field in user model",
|
||||
"description": """
|
||||
:image: https://img.shields.io/badge/licence-AGPL--3-blue.svg
|
||||
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||
:alt: License: AGPL-3
|
||||
============================
|
||||
project_user_default_project
|
||||
============================
|
||||
|
||||
Add default project field in user model
|
||||
|
||||
Installation
|
||||
============
|
||||
|
||||
Use Odoo normal module installation procedure to install
|
||||
``project_user_default_project``.
|
||||
|
||||
Known issues / Roadmap
|
||||
======================
|
||||
|
||||
None yet.
|
||||
|
||||
Bug Tracker
|
||||
===========
|
||||
|
||||
Bugs are tracked on `our issues website <https://github.com/elabore-coop/project-tools/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.
|
||||
|
||||
Credits
|
||||
=======
|
||||
|
||||
Contributors
|
||||
------------
|
||||
|
||||
* Stéphan Sainléger
|
||||
|
||||
Funders
|
||||
-------
|
||||
|
||||
The development of this module has been financially supported by:
|
||||
* Elabore (https://elabore.coop)
|
||||
|
||||
|
||||
Maintainer
|
||||
----------
|
||||
|
||||
This module is maintained by Elabore.
|
||||
|
||||
""",
|
||||
# any module necessary for this one to work correctly
|
||||
"depends": [
|
||||
"base", "project",
|
||||
],
|
||||
"qweb": [
|
||||
# "static/src/xml/*.xml",
|
||||
],
|
||||
"external_dependencies": {
|
||||
"python": [],
|
||||
},
|
||||
# always loaded
|
||||
"data": [
|
||||
"views/res_users_views.xml",
|
||||
],
|
||||
# only loaded in demonstration mode
|
||||
"demo": [],
|
||||
"js": [],
|
||||
"css": [],
|
||||
"installable": True,
|
||||
# Install this module automatically if all dependency have been previously
|
||||
# and independently installed. Used for synergetic or glue modules.
|
||||
"auto_install": False,
|
||||
"application": False,
|
||||
}
|
1
project_user_default_project/i18n/README
Normal file
1
project_user_default_project/i18n/README
Normal file
@@ -0,0 +1 @@
|
||||
This directory should contain the *.po for Odoo translation.
|
27
project_user_default_project/i18n/fr.po
Normal file
27
project_user_default_project/i18n/fr.po
Normal file
@@ -0,0 +1,27 @@
|
||||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * project_user_default_project
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 14.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2022-08-25 15:58+0000\n"
|
||||
"PO-Revision-Date: 2022-08-25 15:58+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_user_default_project
|
||||
#: model:ir.model.fields,field_description:project_user_default_project.field_res_users__default_project_id
|
||||
msgid "Default Project"
|
||||
msgstr "Projet par défaut"
|
||||
|
||||
#. module: project_user_default_project
|
||||
#: model:ir.model,name:project_user_default_project.model_res_users
|
||||
msgid "Users"
|
||||
msgstr "Utilisateurs"
|
||||
|
1
project_user_default_project/models/__init__.py
Normal file
1
project_user_default_project/models/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
from . import res_users
|
6
project_user_default_project/models/res_users.py
Normal file
6
project_user_default_project/models/res_users.py
Normal file
@@ -0,0 +1,6 @@
|
||||
from odoo import _, api, fields, models
|
||||
|
||||
class Users(models.Model):
|
||||
_inherit = "res.users"
|
||||
|
||||
default_project_id = fields.Many2one('project.project', string='Default Project')
|
13
project_user_default_project/views/res_users_views.xml
Normal file
13
project_user_default_project/views/res_users_views.xml
Normal file
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<odoo>
|
||||
<record id="view_users_form_inherit_default_project" model="ir.ui.view">
|
||||
<field name="name">view.users.form.inherit.default.project</field>
|
||||
<field name="model">res.users</field>
|
||||
<field name="inherit_id" ref="base.view_users_form" />
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='action_id']" position="after">
|
||||
<field name="default_project_id" />
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
Reference in New Issue
Block a user