Skip to content
Permalink
Browse files

⬆️1️⃣0️⃣ project_description *Port*

  • Loading branch information...
Ommo73 committed May 24, 2019
1 parent f9668c3 commit 606cd5dab4947d9522597e70e674d08b62a838da
@@ -1,4 +1,5 @@
# -*- coding: utf-8 -*-
# License LGPL-3.0 (https://www.gnu.org/licenses/lgpl.html).
#
#
# OpenERP, Open Source Management Solution
@@ -1,4 +1,10 @@
# -*- coding: utf-8 -*-
# Copyright 2014 Ivan Yelizariev <https://it-projects.info/team/yelizariev>
# Copyright 2015 s0x90 <https://github.com/s0x90>
# Copyright 2016 x620 <https://github.com/x620>
# Copyright 2016 manawi <https://github.com/manawi>
# Copyright 2019 Artem Rafailov <https://it-projects.info/team/Ommo73/>
# License LGPL-3.0 (https://www.gnu.org/licenses/lgpl.html).
#
#
# OpenERP, Open Source Management Solution
@@ -20,21 +26,51 @@
#

{
"name": "Add Project Description",
"version": "1.0",
"author": "Julius Network Solutions",
"website": "http://www.julius.fr",
"name": """Add Project Description""",
"summary": """Adds a description field to the project settings.""",
"category": "Generic Modules/Projects & Services",
"depends": ["project",
],
"init_xml": [],
"update_xml": [
# "live_test_url": "http://apps.it-projects.info/shop/product/DEMO-URL?version=10.0",
"images": [],
"version": "10.0.1.0.0",
"application": False,

"author": "Julius Network Solutions",
"support": "apps@it-projects.info",
"website": "https://it-projects.info/",
"license": "LGPL-3",
# "price": 9.00,
# "currency": "EUR",

"depends": [
"project"
],
"external_dependencies": {"python": [], "bin": []},
"data": [
"security/project_description_security.xml",
"project_view.xml",
],
"data": ["security/project_description_security.xml"],
"demo": [
],
"qweb": [
],

"post_load": None,
"pre_init_hook": None,
"post_init_hook": None,
"uninstall_hook": None,

"auto_install": False,
"installable": True,

'demo_xml': [],
'installable': False,
'active': False,
# "demo_title": "{MODULE_NAME}",
# "demo_addons": [
# ],
# "demo_addons_hidden": [
# ],
# "demo_url": "DEMO-URL",
# "demo_summary": "{SHORT_DESCRIPTION_OF_THE_MODULE}",
# "demo_images": [
# "images/MAIN_IMAGE",
# ]
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
@@ -0,0 +1,4 @@
`1.0.0`
-------

- Init version
@@ -0,0 +1,19 @@
=========================
Add Project Description
=========================

Installation
============

* `Install <https://odoo-development.readthedocs.io/en/latest/odoo/usage/install-module.html>`__

Usage
=====

* Open ``Setting >> Users``
* Select a user
* Click on ``[Edit]`` button
* Click on "Access to project description" checkbox
* Click on ``[Save]`` button
* Open ``Project >> Project >> Settings``
* RESULT: now in the ``Project >> Settings`` you can use description field.
@@ -1,4 +1,10 @@
# -*- coding: utf-8 -*-
# Copyright 2014-2016 Ivan Yelizariev <https://it-projects.info/team/yelizariev>
# Copyright 2015 s0x90 <https://github.com/s0x90>
# Copyright 2016 x620 <https://github.com/x620>
# Copyright 2016 manawi <https://github.com/manawi>
# Copyright 2019 Artem Rafailov <https://it-projects.info/team/Ommo73/>
# License LGPL-3.0 (https://www.gnu.org/licenses/lgpl.html).
#
#
# OpenERP, Open Source Management Solution
@@ -19,28 +25,28 @@
#
#

from openerp import fields, models

from odoo import fields, models


class ProjectProject(models.Model):
_inherit = "project.project"

# restricted field. Allowed group members only.
# restricted field. Allowed group members only.
description = fields.Text('description', groups="project_description.group_access_to_project_description")



class AccountAnalyticAccount(models.Model):
_inherit = 'account.analytic.account'

def name_get(self, cr, uid, ids, context=None):
def name_get(self):
res = []
if not ids:
if not self.ids:
return res
if isinstance(ids, (int, long)):
ids = [ids]
for id in ids:
elmt = self.browse(cr, uid, id, context=context)
if isinstance(self.ids, (int, long)):
self.ids = [self.ids]
for id in self.ids:
elmt = self.browse(id)
res.append((id, elmt.name))
return res
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
@@ -1,4 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<!--Copyright 2014 Ivan Yelizariev <https://it-projects.info/team/yelizariev>
Copyright 2015 s0x90 <https://github.com/s0x90>
License LGPL-3.0 (https://www.gnu.org/licenses/lgpl.html).-->
<openerp>
<data>
<record id="view_project_description_form" model="ir.ui.view">
@@ -1,4 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<!--Copyright 2015 Ivan Yelizariev <https://it-projects.info/team/yelizariev>
Copyright 2015 s0x90 <https://github.com/s0x90>
License LGPL-3.0 (https://www.gnu.org/licenses/lgpl.html).-->
<openerp>
<data noupdate="0">
<record id="group_access_to_project_description" model="res.groups">

0 comments on commit 606cd5d

Please sign in to comment.
You can’t perform that action at this time.