diff --git a/partner_contact_nutrition_diet/README.rst b/partner_contact_nutrition_diet/README.rst new file mode 100644 index 000000000..f054fad61 --- /dev/null +++ b/partner_contact_nutrition_diet/README.rst @@ -0,0 +1,63 @@ +.. 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 + +============================== +Partner Contact Nutrition Diet +============================== + +This module adds the nutrition diet to a partner contact: + +* Lifestyle +* Carnivore +* Pescatarian +* Vegetarian + +Usage +===== + +* Go to Contacts +* Create or select a contact +* Go to the Nutrition tab to select their diet + + +Known issues / Roadmap +====================== + +* None yet + +Bug Tracker +=========== + +Bugs are tracked on `GitHub 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 +======= + +Images +------ + +* Odoo Community Association: `Icon `_. + +Contributors +------------ + +* Maxime Chambreuil + +Maintainer +---------- + +.. image:: https://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: https://odoo-community.org + +This module is maintained by the OCA. + +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. + +To contribute to this module, please visit https://odoo-community.org. \ No newline at end of file diff --git a/partner_contact_nutrition_diet/__init__.py b/partner_contact_nutrition_diet/__init__.py new file mode 100644 index 000000000..79e996da7 --- /dev/null +++ b/partner_contact_nutrition_diet/__init__.py @@ -0,0 +1,5 @@ +# -*- coding: utf-8 -*- +# Copyright 2016 Ursa Information Systems +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from . import models diff --git a/partner_contact_nutrition_diet/__openerp__.py b/partner_contact_nutrition_diet/__openerp__.py new file mode 100644 index 000000000..66a019bb8 --- /dev/null +++ b/partner_contact_nutrition_diet/__openerp__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +# Copyright 2016 Ursa Information Systems +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). +{ + "name": "Partner Contact Nutrition Diet", + "summary": "Set the nutrition diet of your contacts", + "version": "9.0.1.0.0", + "category": "Health", + "website": "http://ursainfosystems.com", + "author": "Ursa Information Systems, Odoo Community Association (OCA)", + "license": "AGPL-3", + "application": False, + "installable": True, + "depends": [ + "partner_contact_nutrition", + ], + "data": [ + "security/ir.model.access.csv", + "views/res_partner_view.xml", + "data/nutrition_diet.xml", + ], +} diff --git a/partner_contact_nutrition_diet/data/nutrition_diet.xml b/partner_contact_nutrition_diet/data/nutrition_diet.xml new file mode 100644 index 000000000..ec276c2ca --- /dev/null +++ b/partner_contact_nutrition_diet/data/nutrition_diet.xml @@ -0,0 +1,24 @@ + + + + + Lifestyle + + + + Carnivore + + + + Pescatarian + + + + Vegetarian + + + + Vegan + + + diff --git a/partner_contact_nutrition_diet/models/__init__.py b/partner_contact_nutrition_diet/models/__init__.py new file mode 100644 index 000000000..e74427a43 --- /dev/null +++ b/partner_contact_nutrition_diet/models/__init__.py @@ -0,0 +1,8 @@ +# -*- coding: utf-8 -*- +# Copyright 2016 Ursa Information Systems +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from . import ( + nutrition_diet, + res_partner, +) \ No newline at end of file diff --git a/partner_contact_nutrition_diet/models/nutrition_diet.py b/partner_contact_nutrition_diet/models/nutrition_diet.py new file mode 100644 index 000000000..c918fe204 --- /dev/null +++ b/partner_contact_nutrition_diet/models/nutrition_diet.py @@ -0,0 +1,12 @@ +# -*- coding: utf-8 -*- +# Copyright 2016 Ursa Information Systems +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + + +from openerp import fields, models + + +class NutritionDiet(models.Model): + _name = 'nutrition.diet' + + name = fields.Char("Name") diff --git a/partner_contact_nutrition_diet/models/res_partner.py b/partner_contact_nutrition_diet/models/res_partner.py new file mode 100644 index 000000000..35e85e43a --- /dev/null +++ b/partner_contact_nutrition_diet/models/res_partner.py @@ -0,0 +1,12 @@ +# -*- coding: utf-8 -*- +# Copyright 2016 Ursa Information Systems +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + + +from openerp import fields, models + + +class ResPartner(models.Model): + _inherit = 'res.partner' + + nutrition_diet_id = fields.Many2one('nutrition.diet', 'Diet') diff --git a/partner_contact_nutrition_diet/security/ir.model.access.csv b/partner_contact_nutrition_diet/security/ir.model.access.csv new file mode 100644 index 000000000..3112ab0be --- /dev/null +++ b/partner_contact_nutrition_diet/security/ir.model.access.csv @@ -0,0 +1,2 @@ +"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink" +"access_nutrition_diet","nutrition_diet group_public","model_nutrition_diet","base.group_public",1,0,0,0 diff --git a/partner_contact_nutrition_diet/static/description/icon.png b/partner_contact_nutrition_diet/static/description/icon.png new file mode 100644 index 000000000..3a0328b51 Binary files /dev/null and b/partner_contact_nutrition_diet/static/description/icon.png differ diff --git a/partner_contact_nutrition_diet/views/res_partner_view.xml b/partner_contact_nutrition_diet/views/res_partner_view.xml new file mode 100644 index 000000000..9cbe58bb0 --- /dev/null +++ b/partner_contact_nutrition_diet/views/res_partner_view.xml @@ -0,0 +1,15 @@ + + + + + Partner Contact Nutrition Diet + res.partner + + + + + + + + + diff --git a/setup/partner_contact_nutrition_diet/odoo_addons/__init__.py b/setup/partner_contact_nutrition_diet/odoo_addons/__init__.py new file mode 100644 index 000000000..de40ea7ca --- /dev/null +++ b/setup/partner_contact_nutrition_diet/odoo_addons/__init__.py @@ -0,0 +1 @@ +__import__('pkg_resources').declare_namespace(__name__) diff --git a/setup/partner_contact_nutrition_diet/odoo_addons/partner_contact_nutrition_diet b/setup/partner_contact_nutrition_diet/odoo_addons/partner_contact_nutrition_diet new file mode 120000 index 000000000..5e37bd221 --- /dev/null +++ b/setup/partner_contact_nutrition_diet/odoo_addons/partner_contact_nutrition_diet @@ -0,0 +1 @@ +../../../partner_contact_nutrition_diet \ No newline at end of file diff --git a/setup/partner_contact_nutrition_diet/setup.py b/setup/partner_contact_nutrition_diet/setup.py new file mode 100644 index 000000000..28c57bb64 --- /dev/null +++ b/setup/partner_contact_nutrition_diet/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +)