diff --git a/gym/LICENSE/LICENSE b/gym/LICENSE/LICENSE new file mode 100644 index 0000000..84bb10a --- /dev/null +++ b/gym/LICENSE/LICENSE @@ -0,0 +1,166 @@ + GNU LESSER GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Copyright (C) 2019-TODAY Serpent Consulting Services Pvt. Ltd. (). + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + + This version of the GNU Lesser General Public License incorporates +the terms and conditions of version 3 of the GNU General Public +License, supplemented by the additional permissions listed below. + + 0. Additional Definitions. + + As used herein, "this License" refers to version 3 of the GNU Lesser +General Public License, and the "GNU GPL" refers to version 3 of the GNU +General Public License. + + "The Library" refers to a covered work governed by this License, +other than an Application or a Combined Work as defined below. + + An "Application" is any work that makes use of an interface provided +by the Library, but which is not otherwise based on the Library. +Defining a subclass of a class defined by the Library is deemed a mode +of using an interface provided by the Library. + + A "Combined Work" is a work produced by combining or linking an +Application with the Library. The particular version of the Library +with which the Combined Work was made is also called the "Linked +Version". + + The "Minimal Corresponding Source" for a Combined Work means the +Corresponding Source for the Combined Work, excluding any source code +for portions of the Combined Work that, considered in isolation, are +based on the Application, and not on the Linked Version. + + The "Corresponding Application Code" for a Combined Work means the +object code and/or source code for the Application, including any data +and utility programs needed for reproducing the Combined Work from the +Application, but excluding the System Libraries of the Combined Work. + + 1. Exception to Section 3 of the GNU GPL. + + You may convey a covered work under sections 3 and 4 of this License +without being bound by section 3 of the GNU GPL. + + 2. Conveying Modified Versions. + + If you modify a copy of the Library, and, in your modifications, a +facility refers to a function or data to be supplied by an Application +that uses the facility (other than as an argument passed when the +facility is invoked), then you may convey a copy of the modified +version: + + a) under this License, provided that you make a good faith effort to + ensure that, in the event an Application does not supply the + function or data, the facility still operates, and performs + whatever part of its purpose remains meaningful, or + + b) under the GNU GPL, with none of the additional permissions of + this License applicable to that copy. + + 3. Object Code Incorporating Material from Library Header Files. + + The object code form of an Application may incorporate material from +a header file that is part of the Library. You may convey such object +code under terms of your choice, provided that, if the incorporated +material is not limited to numerical parameters, data structure +layouts and accessors, or small macros, inline functions and templates +(ten or fewer lines in length), you do both of the following: + + a) Give prominent notice with each copy of the object code that the + Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the object code with a copy of the GNU GPL and this license + document. + + 4. Combined Works. + + You may convey a Combined Work under terms of your choice that, +taken together, effectively do not restrict modification of the +portions of the Library contained in the Combined Work and reverse +engineering for debugging such modifications, if you also do each of +the following: + + a) Give prominent notice with each copy of the Combined Work that + the Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the Combined Work with a copy of the GNU GPL and this license + document. + + c) For a Combined Work that displays copyright notices during + execution, include the copyright notice for the Library among + these notices, as well as a reference directing the user to the + copies of the GNU GPL and this license document. + + d) Do one of the following: + + 0) Convey the Minimal Corresponding Source under the terms of this + License, and the Corresponding Application Code in a form + suitable for, and under terms that permit, the user to + recombine or relink the Application with a modified version of + the Linked Version to produce a modified Combined Work, in the + manner specified by section 6 of the GNU GPL for conveying + Corresponding Source. + + 1) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (a) uses at run time + a copy of the Library already present on the user's computer + system, and (b) will operate properly with a modified version + of the Library that is interface-compatible with the Linked + Version. + + e) Provide Installation Information, but only if you would otherwise + be required to provide such information under section 6 of the + GNU GPL, and only to the extent that such information is + necessary to install and execute a modified version of the + Combined Work produced by recombining or relinking the + Application with a modified version of the Linked Version. (If + you use option 4d0, the Installation Information must accompany + the Minimal Corresponding Source and Corresponding Application + Code. If you use option 4d1, you must provide the Installation + Information in the manner specified by section 6 of the GNU GPL + for conveying Corresponding Source.) + + 5. Combined Libraries. + + You may place library facilities that are a work based on the +Library side by side in a single library together with other library +facilities that are not Applications and are not covered by this +License, and convey such a combined library under terms of your +choice, if you do both of the following: + + a) Accompany the combined library with a copy of the same work based + on the Library, uncombined with any other library facilities, + conveyed under the terms of this License. + + b) Give prominent notice with the combined library that part of it + is a work based on the Library, and explaining where to find the + accompanying uncombined form of the same work. + + 6. Revised Versions of the GNU Lesser General Public License. + + The Free Software Foundation may publish revised and/or new versions +of the GNU Lesser General Public License from time to time. Such new +versions will be similar in spirit to the present version, but may +differ in detail to address new problems or concerns. + + Each version is given a distinguishing version number. If the +Library as you received it specifies that a certain numbered version +of the GNU Lesser General Public License "or any later version" +applies to it, you have the option of following the terms and +conditions either of that published version or of any later version +published by the Free Software Foundation. If the Library as you +received it does not specify a version number of the GNU Lesser +General Public License, you may choose any version of the GNU Lesser +General Public License ever published by the Free Software Foundation. + + If the Library as you received it specifies that a proxy can decide +whether future versions of the GNU Lesser General Public License shall +apply, that proxy's public statement of acceptance of any version is +permanent authorization for you to choose that version for the +Library. diff --git a/gym/README.rst b/gym/README.rst new file mode 100644 index 0000000..d6b7980 --- /dev/null +++ b/gym/README.rst @@ -0,0 +1,75 @@ +============== +GYM Management +============== + +This modules implements GYM management system with the following entities, + +1) Member:- + + --> Member can access his Membership details. + +2) Operator:- + + --> Operator can access all the membership information. + --> Manage Members + +======== +Features +======== + +* Manage Members + + --> Efficiently manage all the members in your gym. + --> Directly create new member into the system when you convert a lead into opportunity. + +* Memberships + + --> Directly create a new membership for the member from Quotation upon sale confirmation. + --> Track the various stages of the Membership lifecycle. + +* Measurement History with BMI and BMR calculation + + --> Efficiently track the body measurement growth of the member. + --> BMI analyse it on graph and see how good they perform. + --> You can configure the default measurement units in your company profile. + +* Manage Trainers + + --> Easily manage your gym trainers. You can categories the trainers according to their skills. + + +* GYM Equipments + + --> Manage your gym equipments. Set them as out of service or in maintenance. + +* Exercises + + --> Configure various exercises, add the steps to be followed and their benefits. + --> You can also add images and video links for better understanding. + +* Pedometer + + --> Track the steps of the member and analyse it on the graph view. + +============ +Similar Apps +============ + +GYM Management +GYM management software +GYM management system +GYM management project +GYM management odoo +Odoo GYM Management +GYM Management with odoo +GYM Management in odoo +GYM membership management software +GYM launch management +GYM management system website +GYM membership management +GYM management app +GYM management plan +GYM management project +GYM management tools +GYM facility management +GYM management roles diff --git a/gym/__init__.py b/gym/__init__.py new file mode 100644 index 0000000..a14d237 --- /dev/null +++ b/gym/__init__.py @@ -0,0 +1,3 @@ +# See LICENSE file for full copyright and licensing details. + +from . import models diff --git a/gym/__manifest__.py b/gym/__manifest__.py new file mode 100644 index 0000000..95c61de --- /dev/null +++ b/gym/__manifest__.py @@ -0,0 +1,57 @@ +# See LICENSE file for full copyright and licensing details. + +{ + 'name': 'GYM Management', + 'summary': 'This module is used for Gym Management with Membership,' + ' Trainer, and Equipment.', + 'version': '13.0.1.0.0', + 'license': 'LGPL-3', + 'author': 'Serpent Consulting Services Pvt. Ltd.', + 'maintainer': 'Serpent Consulting Services Pvt. Ltd.', + 'website': 'http://www.serpentcs.com', + 'category': 'Gym Management', + 'depends': [ + 'sale_management', + 'hr', + 'crm', + 'project', + 'membership', + ], + + 'data': [ + 'data/inactive_rule_data.xml', + 'security/security.xml', + 'security/ir.model.access.csv', + 'data/member_sequence.xml', + 'data/membership_plan_sequence.xml', + 'data/equipment_demo.xml', + 'data/email_template.xml', + 'data/membership_scheduler.xml', + 'data/service_demo.xml', + 'data/exercise_for_demo.xml', + 'data/exercise_demo.xml', + 'data/mail_templates.xml', + 'views/menuitem_hide.xml', + 'views/product_template.xml', + 'views/membership_view.xml', + 'views/project_task_view.xml', + 'views/member_view.xml', + 'views/trainer_view.xml', + 'views/workout_view.xml', + 'views/company_view.xml', + 'views/gym_skills_view.xml', + ], + + 'demo': [ + 'demo/exercise_exercise_demo.xml', + 'demo/user_demo.xml', + 'demo/pedo_meter_demo.xml', + 'demo/food_demo.xml', + 'demo/membership_demo.xml' + ], + 'images': ['static/description/gym.jpg'], + 'application': True, + 'installable': True, + 'price': 199, + 'currency': 'EUR', +} diff --git a/gym/__pycache__/__init__.cpython-36.pyc b/gym/__pycache__/__init__.cpython-36.pyc new file mode 100644 index 0000000..57be1b1 Binary files /dev/null and b/gym/__pycache__/__init__.cpython-36.pyc differ diff --git a/gym/__pycache__/__init__.cpython-37.pyc b/gym/__pycache__/__init__.cpython-37.pyc new file mode 100644 index 0000000..ff340f1 Binary files /dev/null and b/gym/__pycache__/__init__.cpython-37.pyc differ diff --git a/gym/data/email_template.xml b/gym/data/email_template.xml new file mode 100644 index 0000000..2c3e2d9 --- /dev/null +++ b/gym/data/email_template.xml @@ -0,0 +1,18 @@ + + + + + Membership Reminder + ${(user.partner_id.email or '')|safe} + Reminder for Membership Expiration + ${(object.email or '')|safe} + + Hello,

+

Your Membership will expire within 7 days. + Requesting you to do the needful actions.

+

Thank you,

]]> +
+
+ +
diff --git a/gym/data/equipment_demo.xml b/gym/data/equipment_demo.xml new file mode 100644 index 0000000..d407e9d --- /dev/null +++ b/gym/data/equipment_demo.xml @@ -0,0 +1,75 @@ + + + + Barbells + True + + working + + + + CALF-MACHINE + True + + working + + + + CABLES-AND-PULLEYS + True + + working + + + + BENCH-PRESS + True + + working + + + + DUMBBELLS + True + + working + + + + LEG-EXTENSION-MACHINE + True + + working + + + + INCLINE-BENCH-PRESS + True + + working + + + + HAMMER-STRENGTH-MACHINE + True + + working + + + + KETTLEBELLS + True + + working + + + diff --git a/gym/data/exercise_demo.xml b/gym/data/exercise_demo.xml new file mode 100644 index 0000000..43e6b0d --- /dev/null +++ b/gym/data/exercise_demo.xml @@ -0,0 +1,119 @@ + + + + Pull Up Bar + + + + Pull-ups + + + + + Pull-ups + + + + + Pull-ups + + + + + Pull-ups + + + + + Pull down + + + + Deadlift + + + + Dip + + + + Leg curl + + + + Leg press + + + + Dumbbell fly + + + + Dumbbell press + + + + Leg Extension + + + + Snatch + + + + Seated Calf Raise + + + + Bench Press Machine + + + + Bench Press + + + + + Bench Press + + + + + Bench Press + + + + + Bench Press + + + + + Shoulder Press + + + + Crunch + + + + Biceps Curl + + + + Wall sit + + + + Standing calf raise + + + + Chest fly + + + + Bent-over barbell rows + + + diff --git a/gym/data/exercise_for_demo.xml b/gym/data/exercise_for_demo.xml new file mode 100644 index 0000000..0dd60e0 --- /dev/null +++ b/gym/data/exercise_for_demo.xml @@ -0,0 +1,75 @@ + + + + Chest + + + + Shoulders + + + + Triceps + + + + Biceps + + + + Abdominals + + + + Glutes + + + + Abs + + + + Lowerback + + + + Full Body + + + + Forearms + + + + Traps + + + + Calves + + + + Quads + + + + Neck + + + + Middle Back + + + + Lats + + + + Legs + + + + Back + + + diff --git a/gym/data/inactive_rule_data.xml b/gym/data/inactive_rule_data.xml new file mode 100644 index 0000000..35355c0 --- /dev/null +++ b/gym/data/inactive_rule_data.xml @@ -0,0 +1,4 @@ + + + + diff --git a/gym/data/mail_templates.xml b/gym/data/mail_templates.xml new file mode 100644 index 0000000..db3a245 --- /dev/null +++ b/gym/data/mail_templates.xml @@ -0,0 +1,11 @@ + + + Equipement + + + + + + + + diff --git a/gym/data/member_sequence.xml b/gym/data/member_sequence.xml new file mode 100644 index 0000000..a0e015b --- /dev/null +++ b/gym/data/member_sequence.xml @@ -0,0 +1,12 @@ + + + + + Member Sequence + res.partner + 1 + 5 + MEM/%(year)s/ + + + diff --git a/gym/data/membership_plan_sequence.xml b/gym/data/membership_plan_sequence.xml new file mode 100644 index 0000000..6a255d4 --- /dev/null +++ b/gym/data/membership_plan_sequence.xml @@ -0,0 +1,20 @@ + + + + + Membership PLan Sequence + membership.membership_line + 1 + 4 + MEPLAN/%(year)s/ + + + + Membership Number Sequence + membership.number + 1 + 4 + M + + + diff --git a/gym/data/membership_scheduler.xml b/gym/data/membership_scheduler.xml new file mode 100644 index 0000000..ea21b78 --- /dev/null +++ b/gym/data/membership_scheduler.xml @@ -0,0 +1,16 @@ + + + + + Update Membership + + code + model.check_membership_validity() + 1 + days + -1 + + + + diff --git a/gym/data/service_demo.xml b/gym/data/service_demo.xml new file mode 100644 index 0000000..b36b651 --- /dev/null +++ b/gym/data/service_demo.xml @@ -0,0 +1,22 @@ + + + + Gym + + + Cardio + + + Yoga + + + Spa + + + Personal training + + + Nutrition + + + diff --git a/gym/demo/exercise_exercise_demo.xml b/gym/demo/exercise_exercise_demo.xml new file mode 100644 index 0000000..1235ba8 --- /dev/null +++ b/gym/demo/exercise_exercise_demo.xml @@ -0,0 +1,43 @@ + + + + Pull ups are very efficient because each and + every single pull up works out your biceps, triceps, forearms, + wrists, grip strength, lats, shoulders, and your core. + + 1. Sit under the bar and grip it with your palms + facing out + 2. Straighten up and lift about 50 percent of your body weight, + keeping your feet on the ground and your knees slightly bent. Keep + lifting until your chin is over the bar. + 3. Slowly lower yourself back to starting position. + 4. Repeat. + + + + + + + + Maximum Overload the Chest Muscles. The bench + press is virtually unparalleled in its ability to target the chest + muscles with heavy loads.. + + 1. Setup. Lie on the flat bench with your eyes + under the bar. + 2. Grab the bar. Put your pinky on the ring marks of your bar. + 3. Unrack. Take a big breath and unrack the bar by straightening + your arms. + 4. Lower the bar. + 5. Press. + + + + + + + diff --git a/gym/demo/food_demo.xml b/gym/demo/food_demo.xml new file mode 100644 index 0000000..cd5a5e6 --- /dev/null +++ b/gym/demo/food_demo.xml @@ -0,0 +1,206 @@ + + + + Egg + True + + + + + Milk(Add 2 tsp skimmed milk powder ) + True + + + + + Salad + True + + + + + Roti + True + + + + + Sabji + True + + + + + Oats + True + + + + + Vegetable stuffed paratha + True + + + + + Fruits + True + + + + + Curd + True + + + + + Dal + True + + + + + Banana + True + + + + + Toasted bread + True + + + + + Dry Fruit chikki + True + + + + + Roasted Soyabean + True + + + + + Lassi + True + + + + + chicken soup + True + + + + + Tea / Coffee + True + + + + + Cookies + True + + + + + Lukewarm Water + True + + + + + Brown Rice + True + + + + + Butter Milk + True + + + + + Fish + True + + + + + Melon + True + + + + + lean roast beef + True + + + + + Swiss cheese + True + + + + + grain bread + True + + + + + Broccoli + True + + + + + Peanuts + True + + + + + Poha + True + + + + diff --git a/gym/demo/membership_demo.xml b/gym/demo/membership_demo.xml new file mode 100644 index 0000000..681c74c --- /dev/null +++ b/gym/demo/membership_demo.xml @@ -0,0 +1,17 @@ + + + + + False + True + + + False + True + + + False + True + + + diff --git a/gym/demo/pedo_meter_demo.xml b/gym/demo/pedo_meter_demo.xml new file mode 100644 index 0000000..64de060 --- /dev/null +++ b/gym/demo/pedo_meter_demo.xml @@ -0,0 +1,73 @@ + + + + + + 800 + + + + + + 900 + + + + + + 1000 + + + + + + 1200 + + + + + + 1500 + + + + + + 200 + + + + + + 400 + + + + + + 900 + + + + + + 1200 + + + + + + 1500 + + + diff --git a/gym/demo/user_demo.xml b/gym/demo/user_demo.xml new file mode 100644 index 0000000..6143c26 --- /dev/null +++ b/gym/demo/user_demo.xml @@ -0,0 +1,110 @@ + + + + + Member + + member@gym.example.com + YourCompany + + + + + member44@gym.example.com + a + + + + + + + + Troy + + + 54685154854 + member12@gym.example.com + + + + + Lucy + + + 578656882132 + member132@gym.example.com + + + + + Steven + + + 2312365135 + member133@gym.example.com + + + + + + + + 7.05 + 36.00 + 12.00 + 34.00 + 38.00 + 16.00 + 8.00 + 60.00 + 5.03 + + + + + + 6.05 + 35.00 + 10.00 + 32.00 + 36.00 + 13.00 + 6.00 + 55.00 + 5.03 + + + + John + membernn@gym.example.com + + + + + + Ron + member23132679@gym.example.com + + + + + + + + Victoria + member12167@gym.example.com + + + + + + + Victoria + member1211@gym.example.com + + + + diff --git a/gym/models/__init__.py b/gym/models/__init__.py new file mode 100644 index 0000000..abe0c5a --- /dev/null +++ b/gym/models/__init__.py @@ -0,0 +1,24 @@ +# See LICENSE file for full copyright and licensing details. + +from . import member +from . import trainer +from . import product_template +from . import membership +from . import diet +from . import workout +from . import lead +from . import company +from . import gym_skills +from . import project_task +from . import sale +from . import calendar_event +from . import project_document +from . import project_document_case +from . import project_document_category +from . import project_document_group +from . import project_document_name +from . import project_document_opposite +from . import project_other +from . import account_analytic_account +from . import res_partner_credit_card +from . import res_partner_credit_card_type \ No newline at end of file diff --git a/gym/models/__pycache__/__init__.cpython-36.pyc b/gym/models/__pycache__/__init__.cpython-36.pyc new file mode 100644 index 0000000..929db9e Binary files /dev/null and b/gym/models/__pycache__/__init__.cpython-36.pyc differ diff --git a/gym/models/__pycache__/__init__.cpython-37.pyc b/gym/models/__pycache__/__init__.cpython-37.pyc new file mode 100644 index 0000000..c7caf72 Binary files /dev/null and b/gym/models/__pycache__/__init__.cpython-37.pyc differ diff --git a/gym/models/__pycache__/account_analytic_account.cpython-36.pyc b/gym/models/__pycache__/account_analytic_account.cpython-36.pyc new file mode 100644 index 0000000..2056f5e Binary files /dev/null and b/gym/models/__pycache__/account_analytic_account.cpython-36.pyc differ diff --git a/gym/models/__pycache__/account_analytic_account.cpython-37.pyc b/gym/models/__pycache__/account_analytic_account.cpython-37.pyc new file mode 100644 index 0000000..b0d990a Binary files /dev/null and b/gym/models/__pycache__/account_analytic_account.cpython-37.pyc differ diff --git a/gym/models/__pycache__/calendar_event.cpython-36.pyc b/gym/models/__pycache__/calendar_event.cpython-36.pyc new file mode 100644 index 0000000..3d394d7 Binary files /dev/null and b/gym/models/__pycache__/calendar_event.cpython-36.pyc differ diff --git a/gym/models/__pycache__/calendar_event.cpython-37.pyc b/gym/models/__pycache__/calendar_event.cpython-37.pyc new file mode 100644 index 0000000..79834b6 Binary files /dev/null and b/gym/models/__pycache__/calendar_event.cpython-37.pyc differ diff --git a/gym/models/__pycache__/company.cpython-36.pyc b/gym/models/__pycache__/company.cpython-36.pyc new file mode 100644 index 0000000..edada18 Binary files /dev/null and b/gym/models/__pycache__/company.cpython-36.pyc differ diff --git a/gym/models/__pycache__/company.cpython-37.pyc b/gym/models/__pycache__/company.cpython-37.pyc new file mode 100644 index 0000000..d6d19be Binary files /dev/null and b/gym/models/__pycache__/company.cpython-37.pyc differ diff --git a/gym/models/__pycache__/diet.cpython-36.pyc b/gym/models/__pycache__/diet.cpython-36.pyc new file mode 100644 index 0000000..76a3b28 Binary files /dev/null and b/gym/models/__pycache__/diet.cpython-36.pyc differ diff --git a/gym/models/__pycache__/diet.cpython-37.pyc b/gym/models/__pycache__/diet.cpython-37.pyc new file mode 100644 index 0000000..a521d04 Binary files /dev/null and b/gym/models/__pycache__/diet.cpython-37.pyc differ diff --git a/gym/models/__pycache__/gym_skills.cpython-36.pyc b/gym/models/__pycache__/gym_skills.cpython-36.pyc new file mode 100644 index 0000000..784927f Binary files /dev/null and b/gym/models/__pycache__/gym_skills.cpython-36.pyc differ diff --git a/gym/models/__pycache__/gym_skills.cpython-37.pyc b/gym/models/__pycache__/gym_skills.cpython-37.pyc new file mode 100644 index 0000000..15c55d6 Binary files /dev/null and b/gym/models/__pycache__/gym_skills.cpython-37.pyc differ diff --git a/gym/models/__pycache__/lead.cpython-36.pyc b/gym/models/__pycache__/lead.cpython-36.pyc new file mode 100644 index 0000000..10855b7 Binary files /dev/null and b/gym/models/__pycache__/lead.cpython-36.pyc differ diff --git a/gym/models/__pycache__/lead.cpython-37.pyc b/gym/models/__pycache__/lead.cpython-37.pyc new file mode 100644 index 0000000..d10840b Binary files /dev/null and b/gym/models/__pycache__/lead.cpython-37.pyc differ diff --git a/gym/models/__pycache__/member.cpython-36.pyc b/gym/models/__pycache__/member.cpython-36.pyc new file mode 100644 index 0000000..075f884 Binary files /dev/null and b/gym/models/__pycache__/member.cpython-36.pyc differ diff --git a/gym/models/__pycache__/member.cpython-37.pyc b/gym/models/__pycache__/member.cpython-37.pyc new file mode 100644 index 0000000..3b44fdb Binary files /dev/null and b/gym/models/__pycache__/member.cpython-37.pyc differ diff --git a/gym/models/__pycache__/membership.cpython-36.pyc b/gym/models/__pycache__/membership.cpython-36.pyc new file mode 100644 index 0000000..74d259a Binary files /dev/null and b/gym/models/__pycache__/membership.cpython-36.pyc differ diff --git a/gym/models/__pycache__/membership.cpython-37.pyc b/gym/models/__pycache__/membership.cpython-37.pyc new file mode 100644 index 0000000..ced6944 Binary files /dev/null and b/gym/models/__pycache__/membership.cpython-37.pyc differ diff --git a/gym/models/__pycache__/product_template.cpython-36.pyc b/gym/models/__pycache__/product_template.cpython-36.pyc new file mode 100644 index 0000000..8273e2c Binary files /dev/null and b/gym/models/__pycache__/product_template.cpython-36.pyc differ diff --git a/gym/models/__pycache__/product_template.cpython-37.pyc b/gym/models/__pycache__/product_template.cpython-37.pyc new file mode 100644 index 0000000..bc7a0e5 Binary files /dev/null and b/gym/models/__pycache__/product_template.cpython-37.pyc differ diff --git a/gym/models/__pycache__/project_document.cpython-36.pyc b/gym/models/__pycache__/project_document.cpython-36.pyc new file mode 100644 index 0000000..0047be3 Binary files /dev/null and b/gym/models/__pycache__/project_document.cpython-36.pyc differ diff --git a/gym/models/__pycache__/project_document.cpython-37.pyc b/gym/models/__pycache__/project_document.cpython-37.pyc new file mode 100644 index 0000000..f3c10d7 Binary files /dev/null and b/gym/models/__pycache__/project_document.cpython-37.pyc differ diff --git a/gym/models/__pycache__/project_document_case.cpython-36.pyc b/gym/models/__pycache__/project_document_case.cpython-36.pyc new file mode 100644 index 0000000..ffce8ab Binary files /dev/null and b/gym/models/__pycache__/project_document_case.cpython-36.pyc differ diff --git a/gym/models/__pycache__/project_document_case.cpython-37.pyc b/gym/models/__pycache__/project_document_case.cpython-37.pyc new file mode 100644 index 0000000..acf0d45 Binary files /dev/null and b/gym/models/__pycache__/project_document_case.cpython-37.pyc differ diff --git a/gym/models/__pycache__/project_document_category.cpython-36.pyc b/gym/models/__pycache__/project_document_category.cpython-36.pyc new file mode 100644 index 0000000..c37b8ab Binary files /dev/null and b/gym/models/__pycache__/project_document_category.cpython-36.pyc differ diff --git a/gym/models/__pycache__/project_document_category.cpython-37.pyc b/gym/models/__pycache__/project_document_category.cpython-37.pyc new file mode 100644 index 0000000..b4d7351 Binary files /dev/null and b/gym/models/__pycache__/project_document_category.cpython-37.pyc differ diff --git a/gym/models/__pycache__/project_document_group.cpython-36.pyc b/gym/models/__pycache__/project_document_group.cpython-36.pyc new file mode 100644 index 0000000..74e0017 Binary files /dev/null and b/gym/models/__pycache__/project_document_group.cpython-36.pyc differ diff --git a/gym/models/__pycache__/project_document_group.cpython-37.pyc b/gym/models/__pycache__/project_document_group.cpython-37.pyc new file mode 100644 index 0000000..e03bcc7 Binary files /dev/null and b/gym/models/__pycache__/project_document_group.cpython-37.pyc differ diff --git a/gym/models/__pycache__/project_document_name.cpython-36.pyc b/gym/models/__pycache__/project_document_name.cpython-36.pyc new file mode 100644 index 0000000..445cfff Binary files /dev/null and b/gym/models/__pycache__/project_document_name.cpython-36.pyc differ diff --git a/gym/models/__pycache__/project_document_name.cpython-37.pyc b/gym/models/__pycache__/project_document_name.cpython-37.pyc new file mode 100644 index 0000000..b099f4c Binary files /dev/null and b/gym/models/__pycache__/project_document_name.cpython-37.pyc differ diff --git a/gym/models/__pycache__/project_document_opposite.cpython-36.pyc b/gym/models/__pycache__/project_document_opposite.cpython-36.pyc new file mode 100644 index 0000000..54db9e1 Binary files /dev/null and b/gym/models/__pycache__/project_document_opposite.cpython-36.pyc differ diff --git a/gym/models/__pycache__/project_document_opposite.cpython-37.pyc b/gym/models/__pycache__/project_document_opposite.cpython-37.pyc new file mode 100644 index 0000000..498933c Binary files /dev/null and b/gym/models/__pycache__/project_document_opposite.cpython-37.pyc differ diff --git a/gym/models/__pycache__/project_other.cpython-36.pyc b/gym/models/__pycache__/project_other.cpython-36.pyc new file mode 100644 index 0000000..c65dfe7 Binary files /dev/null and b/gym/models/__pycache__/project_other.cpython-36.pyc differ diff --git a/gym/models/__pycache__/project_other.cpython-37.pyc b/gym/models/__pycache__/project_other.cpython-37.pyc new file mode 100644 index 0000000..b79b7d9 Binary files /dev/null and b/gym/models/__pycache__/project_other.cpython-37.pyc differ diff --git a/gym/models/__pycache__/project_task.cpython-36.pyc b/gym/models/__pycache__/project_task.cpython-36.pyc new file mode 100644 index 0000000..de88546 Binary files /dev/null and b/gym/models/__pycache__/project_task.cpython-36.pyc differ diff --git a/gym/models/__pycache__/project_task.cpython-37.pyc b/gym/models/__pycache__/project_task.cpython-37.pyc new file mode 100644 index 0000000..5e89d1a Binary files /dev/null and b/gym/models/__pycache__/project_task.cpython-37.pyc differ diff --git a/gym/models/__pycache__/res_partner_credit_card.cpython-36.pyc b/gym/models/__pycache__/res_partner_credit_card.cpython-36.pyc new file mode 100644 index 0000000..35fc10c Binary files /dev/null and b/gym/models/__pycache__/res_partner_credit_card.cpython-36.pyc differ diff --git a/gym/models/__pycache__/res_partner_credit_card.cpython-37.pyc b/gym/models/__pycache__/res_partner_credit_card.cpython-37.pyc new file mode 100644 index 0000000..15cf510 Binary files /dev/null and b/gym/models/__pycache__/res_partner_credit_card.cpython-37.pyc differ diff --git a/gym/models/__pycache__/res_partner_credit_card_type.cpython-36.pyc b/gym/models/__pycache__/res_partner_credit_card_type.cpython-36.pyc new file mode 100644 index 0000000..69e92cd Binary files /dev/null and b/gym/models/__pycache__/res_partner_credit_card_type.cpython-36.pyc differ diff --git a/gym/models/__pycache__/res_partner_credit_card_type.cpython-37.pyc b/gym/models/__pycache__/res_partner_credit_card_type.cpython-37.pyc new file mode 100644 index 0000000..8ebfaf7 Binary files /dev/null and b/gym/models/__pycache__/res_partner_credit_card_type.cpython-37.pyc differ diff --git a/gym/models/__pycache__/sale.cpython-36.pyc b/gym/models/__pycache__/sale.cpython-36.pyc new file mode 100644 index 0000000..60ef333 Binary files /dev/null and b/gym/models/__pycache__/sale.cpython-36.pyc differ diff --git a/gym/models/__pycache__/sale.cpython-37.pyc b/gym/models/__pycache__/sale.cpython-37.pyc new file mode 100644 index 0000000..ce7e72b Binary files /dev/null and b/gym/models/__pycache__/sale.cpython-37.pyc differ diff --git a/gym/models/__pycache__/trainer.cpython-36.pyc b/gym/models/__pycache__/trainer.cpython-36.pyc new file mode 100644 index 0000000..b6a3065 Binary files /dev/null and b/gym/models/__pycache__/trainer.cpython-36.pyc differ diff --git a/gym/models/__pycache__/trainer.cpython-37.pyc b/gym/models/__pycache__/trainer.cpython-37.pyc new file mode 100644 index 0000000..62ab2ba Binary files /dev/null and b/gym/models/__pycache__/trainer.cpython-37.pyc differ diff --git a/gym/models/__pycache__/workout.cpython-36.pyc b/gym/models/__pycache__/workout.cpython-36.pyc new file mode 100644 index 0000000..b571eea Binary files /dev/null and b/gym/models/__pycache__/workout.cpython-36.pyc differ diff --git a/gym/models/__pycache__/workout.cpython-37.pyc b/gym/models/__pycache__/workout.cpython-37.pyc new file mode 100644 index 0000000..4c57b8d Binary files /dev/null and b/gym/models/__pycache__/workout.cpython-37.pyc differ diff --git a/gym/models/account_analytic_account.py b/gym/models/account_analytic_account.py new file mode 100644 index 0000000..9608bd3 --- /dev/null +++ b/gym/models/account_analytic_account.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- + +from odoo import fields, models,api + + +class AccountAnalyticAccount(models.Model): + _inherit = 'account.analytic.account' + + + is_location = fields.Boolean( + string='Is Location', + compute='compute_is_location', + store=True + ) + + + @api.depends('group_id') + def compute_is_location(self): + for record in self: + if record.group_id.name=='Location': + record.is_location=True + else: + record.is_location=False diff --git a/gym/models/calendar_event.py b/gym/models/calendar_event.py new file mode 100644 index 0000000..87af355 --- /dev/null +++ b/gym/models/calendar_event.py @@ -0,0 +1,15 @@ +# See LICENSE file for full copyright and licensing details. + +from odoo import api, models + + +class CalendarEvent(models.Model): + + _inherit = 'calendar.event' + + @api.model + def inactive_rule(self): + rule_rec = self.env.ref('calendar.calendar_event_rule_employee', + raise_if_not_found=False) + if rule_rec and rule_rec.active: + rule_rec.active = False diff --git a/gym/models/company.py b/gym/models/company.py new file mode 100644 index 0000000..9c60276 --- /dev/null +++ b/gym/models/company.py @@ -0,0 +1,20 @@ +# See LICENSE file for full copyright and licensing details. + +from odoo import fields, models + + +class ResCompany(models.Model): + _inherit = 'res.company' + + default_password = fields.Char('Password', default='gym', + help="""This will be used as a + default password when a + user gets automatically created + when an employee is created!""") + default_umo_of_height_id = fields.Many2one('uom.uom', + string='Unit of Height') + default_umo_of_weight_id = fields.Many2one('uom.uom', + string='Unit of Weight') + default_umo_of_measure_id = fields.Many2one('uom.uom', + string='Unit of Body Part ' + 'Measurement') diff --git a/gym/models/diet.py b/gym/models/diet.py new file mode 100644 index 0000000..9a492e1 --- /dev/null +++ b/gym/models/diet.py @@ -0,0 +1,46 @@ +# See LICENSE file for full copyright and licensing details. + +from odoo import fields, models + + +class DietPlan(models.Model): + """Model for creating diet plan.""" + + _name = 'diet.plan' + _description = "Model for creating diet plan" + + name = fields.Char('Name') + diet_plans_ids = fields.One2many('diet.plan.lines', 'plan_id', 'Plans') + + +class DietPlanLines(models.Model): + """Model for add interval and food item in diet plan.""" + + _name = 'diet.plan.lines' + _description = "Diet Plan Lines" + + interval = fields.Selection([('early_morning', 'Early Morning'), + ('breakfast', 'Breakfast'), + ('pre_lunch', 'Pre Lunch'), + ('lunch', 'Lunch'), + ('snack', 'Snack'), + ('dinner', 'Dinner')], + 'Interval', + help='Interval for Eating the food') + plan_id = fields.Many2one('diet.plan', 'Plans') + food_item_ids = fields.One2many('food.item', 'food_id', 'Food Items', + help='Foods and interval') + + +class FoodItem(models.Model): + """Model for adding food item in diet plan.""" + + _name = 'food.item' + _description = "Food Item" + + food_name_id = fields.Many2one('product.template', 'Food Item') + quantity = fields.Integer(string='Qty', help='Quantity of Food Items') + food_id = fields.Many2one('diet.plan.lines', 'Food Items', + help='Select Food Items') + measure_unit_id = fields.Many2one('uom.uom', string='Measurement Unit', + help='Measurement Unit for Food item') diff --git a/gym/models/gym_skills.py b/gym/models/gym_skills.py new file mode 100644 index 0000000..f353beb --- /dev/null +++ b/gym/models/gym_skills.py @@ -0,0 +1,11 @@ +# See LICENSE file for full copyright and licensing details. + +from odoo import fields, models + + +class GymSkills(models.Model): + _name = 'gym.skills' + _description = "Gym Skills" + + name = fields.Char('Skill', required=True) + code = fields.Char('Code') diff --git a/gym/models/lead.py b/gym/models/lead.py new file mode 100644 index 0000000..a581f84 --- /dev/null +++ b/gym/models/lead.py @@ -0,0 +1,15 @@ +# See LICENSE file for full copyright and licensing details. + +from odoo import models + + +class CrmLead(models.Model): + _inherit = 'crm.lead' + + def _lead_create_contact(self, name, is_company, parent_id=False): + res = super(CrmLead, self)._lead_create_contact(name, is_company, + parent_id=parent_id) + for lead in res: + lead.customer = True + lead.is_member = True + return res diff --git a/gym/models/member.py b/gym/models/member.py new file mode 100644 index 0000000..530c4c5 --- /dev/null +++ b/gym/models/member.py @@ -0,0 +1,325 @@ +# See LICENSE file for full copyright and licensing details. + +from odoo import api, fields, models, _ +from datetime import date +from odoo.exceptions import ValidationError + + +class ResUsers(models.Model): + """Users's detail.""" + + _inherit = 'res.users' + + @api.model + def create(self, vals): + return super(ResUsers, + self.with_context(is_create_user=True)).create(vals) + + +class MemberDetail(models.Model): + """Member's detail.""" + + _inherit = 'res.partner' + + is_member = fields.Boolean(string='Is member ?', + default=lambda self: self.env.context. + get('member_default', False)) + is_operator = fields.Boolean(string='Operator') + gender = fields.Selection([('male', 'Male'), ('female', 'Female')], + string='Gender', default='male') + occupation = fields.Char('Occupation') + reg_no = fields.Char('Member ID', copy=False, + help='Registration Number of Member') + member_measurement_ids = fields.One2many('body.measurement', 'partner_id', + 'Measurement History', + help='Body Measurement History ' + 'of the Member') + birthdate = fields.Date('Date of Birth') + age = fields.Float(compute='_compute_calculate_age', string='Age',store=True) + measurements = fields.Integer(compute="_compute_cal_total_measurement", + string="Total measurement") + membership = fields.Integer(compute="_compute_cal_total_membership", + string="Total membership") + user_id = fields.Many2one('res.users', copy=False, string='User', + ondelete="cascade") + email = fields.Char(copy=False) + + document_ids = fields.One2many( + comodel_name='project.document', + inverse_name="partner_id", + string='Documents', + ) + + document_opposite_ids = fields.One2many( + comodel_name='project.document.opposite', + inverse_name='partner_id', + string='Opposite Party Documents', + ) + + document_case_ids = fields.One2many( + comodel_name='project.document.case', + inverse_name='partner_id', + string='Case Related Documents', + ) + + docuemnt_other_ids = fields.One2many( + comodel_name='project.document.other', + inverse_name='partner_id', + string='Other Documents', + ) + + membership_number = fields.Char( + string='Membership No', + default='New' + ) + + account_manager_id = fields.Many2one( + comodel_name='res.users', + string='Account Manager', + ) + + analytic_id = fields.Many2one( + comodel_name='account.analytic.account', + string="Home Club" + ) + + home_club = fields.Char( + string='Home Clubs', + ) + + nationality_id = fields.Many2one( + comodel_name='res.country', + string='Nationality', + ) + + marketing_source = fields.Char( + string='Marketing Source', + ) + + referred_by_id = fields.Many2one( + comodel_name='res.users', + string='Referred By', + ) + + emirate_number = fields.Char( + string='Emirates ID', + ) + + passport_number = fields.Char( + string='Passport Number', + ) + + credit_card_ids = fields.One2many( + comodel_name='res.partner.credit.card', + inverse_name='partner_id', + string='Credit Cards', + ) + + def unlink(self): + for rec in self: + user_id = rec.user_id + rec.user_id = False + user_id.unlink() + return super(MemberDetail, self).unlink() + + @api.model + def inactive_rule(self): + rule_rec = self.env.ref('base.res_partner_rule_private_employee', + raise_if_not_found=False) + if rule_rec and rule_rec.active: + rule_rec.active = False + + @api.constrains('birthdate') + def _check_birthdate(self): + """Check birth date of Member.""" + if self.birthdate and self.birthdate >= date.today(): + raise ValidationError(_("Birth date must be less than today's" + " date.")) + + def _compute_cal_total_measurement(self): + """Measurement history count.""" + for partner_rec in self: + partner_rec.measurements = \ + partner_rec.member_measurement_ids and len( + partner_rec.member_measurement_ids.ids) + + def _compute_cal_total_membership(self): + """Count no of membership of the member.""" + for partner_rec in self: + partner_rec.membership = \ + partner_rec.member_lines and len( + partner_rec.member_lines.ids) + + @api.depends('birthdate') + def _compute_calculate_age(self): + """Age calculation of member.""" + for partner_rec in self: + partner_rec.age = \ + partner_rec.birthdate and \ + date.today().year - partner_rec.birthdate.year + + @api.model + def create(self, vals): + """Create sequence of member.""" + rec = super(MemberDetail, self).create(vals) + if vals.get('name'): + vals['reg_no'] = self.env[ + 'ir.sequence'].next_by_code('res.partner') + if vals.get('is_member'): + if rec.membership_number=='New': + rec.membership_number= self.env[ + 'ir.sequence'].next_by_code('membership.number') + if not self.env['res.users']._context.get('is_create_user'): + rec.user_id = self.env['res.users'].sudo().create({ + 'name': rec.name, + 'login': rec.email, + 'partner_id': rec.id, + 'password': rec.company_id.default_password or '', + 'groups_id': [(6, 0, [self.env.ref( + 'gym.group_gym_member').id])] + }).id + return rec + + def open_user(self): + """ + This Method is used to Open User from member record. + @param self: The object pointer + """ + # Created res users in open + return { + 'view_type': 'form', + 'view_id': self.env.ref('base.view_users_form').id, + 'view_mode': 'form', + 'res_model': 'res.users', + 'res_id': self.user_id.id, + 'type': 'ir.actions.act_window' + } + + +class BodyMeasurement(models.Model): + """Body Measurement of the Member.""" + + _name = 'body.measurement' + _description = "Body Measurement" + _rec_name = 'partner_id' + + partner_id = fields.Many2one('res.partner', 'Member') + date = fields.Date('Date', required=True) + neck = fields.Float('Neck') + umo_neck_id = fields.Many2one( + 'uom.uom', string='Measurement Unit', + domain=lambda self: [('category_id', '=', + self.env.ref('uom.uom_categ_length').id)]) + chest = fields.Float('Chest') + umo_chest_id = fields.Many2one( + 'uom.uom', string='Measurement Unit for Chest', + domain=lambda self: [('category_id', '=', + self.env.ref('uom.uom_categ_length').id)]) + biceps = fields.Float('Biceps') + umo_biceps_id = fields.Many2one( + 'uom.uom', string='Measurement Unit Biceps', + domain=lambda self: [('category_id', '=', + self.env.ref('uom.uom_categ_length').id)]) + waist = fields.Float('Waist') + umo_waist_id = fields.Many2one( + 'uom.uom', string='Measurement Unit Waist', + domain=lambda self: [('category_id', '=', + self.env.ref('uom.uom_categ_length').id)]) + hips = fields.Float('Hips') + umo_hips_id = fields.Many2one( + 'uom.uom', string='Measurement Unit Hips', + domain=lambda self: [('category_id', '=', + self.env.ref('uom.uom_categ_length').id)]) + thigh = fields.Float('Thighs') + umo_thigh_id = fields.Many2one( + 'uom.uom', string='Measurement Unit Thigh', + domain=lambda self: [('category_id', '=', + self.env.ref('uom.uom_categ_length').id)]) + calf = fields.Float('Calf') + umo_calf_id = fields.Many2one( + 'uom.uom', string='Measurement Unit Calf', + domain=lambda self: [('category_id', '=', + self.env.ref('uom.uom_categ_length').id)]) + weight = fields.Float('Weight') + umo_weight_id = fields.Many2one( + 'uom.uom', string='Measurement Unit Weight', + domain=lambda self: [('category_id', '=', + self.env.ref('uom.product_uom_categ_kgm').id)]) + height = fields.Float('Height') + umo_height_id = fields.Many2one( + 'uom.uom', string='Measurement Unit Height', + domain=lambda self: [('category_id', '=', + self.env.ref('uom.uom_categ_length').id)]) + bmi = fields.Float( + compute='_compute_bmi', + string='BMI', + default=0.0, + help='Used for Body mass index Calculation') + bmr = fields.Float(string='BMR', compute='_compute_bmr', + help='Used for Body Metabolic rate Calculation') + + image_128 = fields.Binary( + related='partner_id.image_128', + ) + + @api.model + def default_get(self, fields): + res = super(BodyMeasurement, self).default_get(fields) + height_uom = self.env.user.company_id and\ + self.env.user.company_id.default_umo_of_height_id + weight_uom = self.env.user.company_id and\ + self.env.user.company_id.default_umo_of_weight_id + body_pary_uom = self.env.user.company_id and\ + self.env.user.company_id.default_umo_of_measure_id + + res.update({ + 'umo_weight_id': weight_uom.id, + 'umo_height_id': height_uom.id, + 'umo_calf_id': body_pary_uom.id, + 'umo_thigh_id': body_pary_uom.id, + 'umo_hips_id': body_pary_uom.id, + 'umo_waist_id': body_pary_uom.id, + 'umo_biceps_id': body_pary_uom.id, + 'umo_chest_id': body_pary_uom.id, + 'umo_neck_id': body_pary_uom.id, + }) + return res + + @api.depends('height', 'weight') + def _compute_bmi(self): + """Calculation of the Body mass index.""" + bmi = 0 + for rec in self.filtered( + lambda rec: rec.height and rec.weight): + bmi = rec.weight / (rec.height * rec.height) + self.bmi = bmi + + @api.depends('height', 'weight', 'partner_id.age') + def _compute_bmr(self): + """Calculation of the Basal metabolic rate.""" + bmr = 0 + for measurement_rec in self.filtered( + lambda measurement_rec: measurement_rec.height and + measurement_rec.weight): + bmr = 66.47 + (13.75 * measurement_rec.weight) \ + + (5.0 * measurement_rec.height) \ + - (6.75 * measurement_rec.partner_id.age) + self.bmr = bmr + + +class BodyPart(models.Model): + _name = 'body.part' + _description = "Body Part" + + name = fields.Char('Body part') + + +class PedoMeter(models.Model): + """Model for pedo meter.""" + + _name = 'pedo.meter' + _description = "Pedo Meter" + + partner_id = fields.Many2one('res.partner', 'Pedometer') + date = fields.Date('Date', required=True) + steps = fields.Integer('Steps', required=True) diff --git a/gym/models/membership.py b/gym/models/membership.py new file mode 100644 index 0000000..3b6e2e1 --- /dev/null +++ b/gym/models/membership.py @@ -0,0 +1,207 @@ +# See LICENSE file for full copyright and licensing details. + +from datetime import date +from dateutil.relativedelta import relativedelta +from odoo import api, fields, models, _ +from odoo.exceptions import ValidationError + + +class MembershipInvoice(models.TransientModel): + """Membership Invoice Wizard.""" + + _inherit = 'membership.invoice' + + product_id = fields.Many2one('product.product', + string='Membership', help='Membership plan') + membership_plan_id = fields.Many2one('product.template', 'Membership Plan', + help='Selection of membership plan ' + 'in membership invoice') + + +class MembershipPlanMain(models.Model): + """Inherited Membership line object for membership records.""" + + _inherit = 'membership.membership_line' + + membership_id = fields.Many2one('product.product', + string="Membership Scheme", + required=True) + end_date = fields.Date('End Date', help='End date of the Membership') + states = fields.Selection([('draft', 'Draft'), + ('confirm', 'Confirmed'), + ('expire', 'Expired'), + ('cancel', 'Cancelled')], + string='Status', + default='draft') + plan_sequence = fields.Char('Plan ID', + help='Sequence of the Membership Plan') + sale_order_id = fields.Many2one('sale.order', 'Order', + readonly=True, copy=False, + help='Store the Reference of the sale' + ' order') + paid_amount = fields.Float('Paid Amount', store=True, + compute='_compute_get_paid_amount') + + @api.depends('sale_order_id.invoice_ids.amount_residual') + def _compute_get_paid_amount(self): + for rec in self: + amount_total = 0 + for inv in rec.sale_order_id.invoice_ids.filtered( + lambda inv: inv.state != 'draft'): + amount_total += (inv.amount_total - inv.amount_residual) + rec.paid_amount = amount_total + + @api.onchange('membership_id') + def _onchange_membership_id(self): + self.member_price = self.membership_id.list_price + + @api.constrains('date', 'end_date', 'partner', 'membership_id') + def _check_time(self): + """Start and End date validation.""" + if self.date and self.end_date and self.date >= self.end_date: + raise ValidationError(_("End date must be greater " + "than the start date.")) + membership_ids = self.search([ + ('partner', '=', self.partner.id), + ('membership_id', '=', self.membership_id.id), + '|', '&', + ('date', '<=', self.date), + '&', ('end_date', '>=', self.date), + ('date', '<', self.end_date), + '&', ('date', '<', self.end_date), + ('end_date', '>', self.date), + ('id', '!=', self.id)]) + if membership_ids: + raise ValidationError(_("You can not create membership, This " + "membership is already created.")) + + @api.model + def create(self, vals): + """Sequence of Membership record.""" + if vals.get('partner'): + vals['plan_sequence'] = self.env[ + 'ir.sequence'].next_by_code('membership.membership_line') + return super(MembershipPlanMain, self).create(vals) + + def unlink(self): + for mem_rec in self: + if mem_rec.states == 'confirm': + raise ValidationError( + _("Sorry, you can't delete a confirmed membership.")) + return super(MembershipPlanMain, self).unlink() + + def copy(self, default=None): + for mem_rec in self: + if mem_rec.states == 'confirm': + raise ValidationError( + _("Sorry, you can't duplicate a confirmed membership.")) + return super(MembershipPlanMain, self).copy(default) + + def action_draft(self): + """Set the Membership to draft.""" + for mem_rec in self: + mem_rec.states = "draft" + + def action_cancel(self): + """Set the Membership to cancelled.""" + for mem_rec in self: + mem_rec.states = "cancel" + + def action_confirm(self): + """Set the Membership to confirmed.""" + for mem_rec in self: + sale_order_id = self.env['sale.order'].with_context( + is_membership_created=True).create( + {'partner_id': mem_rec.partner.id, + 'membership': True, + 'start_date': mem_rec.date, + 'end_date': mem_rec.end_date, + 'order_line': [(0, 0, + {'product_id': mem_rec.membership_id.id, + 'price_unit': mem_rec.member_price})]}) + sale_order_id.action_confirm() + mem_rec.write({'states': 'confirm', + 'sale_order_id': sale_order_id.id}) + + def action_expire(self): + """Set the Membership to expired.""" + for mem_rec in self: + mem_rec.states = "expire" + + @api.model + def check_membership_validity(self): + """Method for calculating the remaining days of Membership and gives + notification of membership Expiration. + """ + user_rec = self.env.user + curr_day = date.today() + # searching on membership.membership_line + membership_line = self.search( + ['|', ('end_date', '<', curr_day), '&', + ('end_date', '>=', curr_day), + '&', + ('end_date', '<=', curr_day + relativedelta(days=7)), + ('states', 'in', ['confirm'])]) + # loop on membership.membership_line + for membership_rec in membership_line: + # fetching email of member. + if membership_rec.partner.email: + # template for email + template = self.env.ref('gym.membership_expiration') + end_dt = membership_rec.end_date + remain_days = end_dt - curr_day + due_days = str(max(0, remain_days.days)) + # Setting the membership state to expire if days are 0 + if remain_days.days <= 0: + membership_rec.action_expire() + # Email content + if template: + body = '' + body += "

Hello " + membership_rec.partner.name + \ + ",


" + body += "

This email is to inform you that your " \ + "membership will be expiring in " \ + + due_days + " days." "


" + body += "

For renewal, please contact the " \ + "manager." "


" + body += "

Thank You." "


" + body += "

" + user_rec.company_id.name + "," "


" + body += "

" + user_rec.name + "." "


" + template.write({'body_html': body}) + template.send_mail(membership_rec.partner.id, + force_send=True) + + @api.depends('account_invoice_id.state', + 'account_invoice_id.amount_residual', + 'account_invoice_id.invoice_payment_state') + def _compute_state(self): + """Compute the state lines """ + if not self: + return + if self.account_invoice_id: + self._cr.execute(''' + SELECT reversed_entry_id, COUNT(id) + FROM account_move + WHERE reversed_entry_id IN %s + GROUP BY reversed_entry_id + ''', [tuple(self.mapped('account_invoice_id.id'))]) + reverse_map = dict(self._cr.fetchall()) + for line in self: + move_state = line.account_invoice_id.state + payment_state = line.account_invoice_id.invoice_payment_state + + line.state = 'none' + if move_state == 'draft': + line.state = 'waiting' + elif move_state == 'posted': + if payment_state == 'paid': + if reverse_map.get(line.account_invoice_id.id): + line.state = 'canceled' + else: + line.state = 'paid' + elif payment_state == 'in_payment': + line.state = 'paid' + elif payment_state == 'not_paid': + line.state = 'invoiced' + elif move_state == 'cancel': + line.state = 'canceled' diff --git a/gym/models/product_template.py b/gym/models/product_template.py new file mode 100644 index 0000000..165b972 --- /dev/null +++ b/gym/models/product_template.py @@ -0,0 +1,147 @@ +# See LICENSE file for full copyright and licensing details. + +from odoo import fields, models + + +class GymEquipments(models.Model): + """Inherited product model for creating Equipment.""" + + _inherit = 'product.template' + + is_equipment = fields.Boolean(string='Is Equipment', + default=lambda self: self.env.context. + get('equipments_default', False)) + exercise_ids = fields.Many2many('exercise.type', + string='Exercise Type', + help='This Equipment is For which ' + 'Type of Exercise') + state = fields.Selection([('working', 'Working'), + ('maintenance', 'Maintenance'), + ('repair', 'Repair'), + ('out_of_service', 'Out Of Service')], 'State', + help='States of the Equipment', default='working') + note = fields.Text('Note') + company = fields.Char('Company Name') + purchase_date = fields.Date('Purchase Date') + is_service = fields.Boolean(string='Is Service', + default=lambda self: self.env.context. + get('service_default', False)) + is_food = fields.Boolean(string='Is Food?') + unit_id = fields.Many2one('uom.uom', string="Unit of Measure", + help='Measurement Unit for Food item') + quantity = fields.Char('Quantity') + calorie = fields.Float('Calories') + protein = fields.Float('Protein') + carbohydrates = fields.Float('Carbohydrates') + fat = fields.Float(string='Fat') + fibres = fields.Float('Fibres') + sodium = fields.Float('Sodium') + is_membership = fields.Boolean(string='Is Membership ?', + help='Check if the product is eligible ' + 'for membership.') + + def sts_work(self): + for equipment_rec in self: + equipment_rec.state = 'working' + cr, uid, context, su = self.env.args + context = dict(context) + template_id = self.env.ref('gym.equipement_repair_template') + to_mail_id = [] + employee_ids = self.env['hr.employee'].search( + [('active', '=', True)]) + for employee_id in employee_ids: + if employee_id.user_id and \ + employee_id.user_id.partner_id.email: + to_mail_id.append( + employee_id.user_id.email) + + to_mail_ids = ','.join(to_mail_id) + body_html = """ +

Hello Trainer,

+

It is to be informed that ${object.name} + is working.

+ """ + user_id = self.env['res.users'].browse(uid) + if to_mail_ids: + template_id.write( + {'body_html': body_html, + 'subject': 'Equipment is Working.', + 'email_from': str(user_id.email), + 'email_to': to_mail_ids, + 'lang': 'lang' in context and + context.get('lang', 'en_US')}) + template_id.send_mail(self.id, force_send=True) + + def sts_maintan(self): + for equipment_rec in self: + equipment_rec.state = 'maintenance' + cr, uid, context, su = self.env.args + context = dict(context) + template_id = self.env.ref('gym.equipement_repair_template') + to_mail_id = [] + employee_ids = self.env['hr.employee'].search( + [('active', '=', True)]) + for employee_id in employee_ids: + if employee_id.user_id and \ + employee_id.user_id.partner_id.email: + to_mail_id.append( + employee_id.user_id.email) + + to_mail_ids = ','.join(to_mail_id) + body_html = """ +

Hello Trainer,

+

It is to be informed that ${object.name} + is under maintenance.

+ """ + user_id = self.env['res.users'].browse(uid) + if to_mail_ids: + template_id.write( + {'body_html': body_html, + 'subject': 'Equipment is under maintenance.', + 'email_from': str(user_id.email), + 'email_to': to_mail_ids, + 'lang': 'lang' in context and + context.get('lang', 'en_US')}) + template_id.send_mail(self.id, force_send=True) + + def sts_rpr(self): + for equipment_rec in self: + equipment_rec.state = 'repair' + cr, uid, context, su = self.env.args + context = dict(context) + template_id = self.env.ref('gym.equipement_repair_template') + to_mail_id = [] + employee_ids = self.env['hr.employee'].search( + [('active', '=', True)]) + for employee_id in employee_ids: + if employee_id.user_id and \ + employee_id.user_id.partner_id.email: + to_mail_id.append( + employee_id.user_id.email) + + to_mail_ids = ','.join(to_mail_id) + body_html = """ +

Hello Trainer,

+

It is to be informed that${object.name} + is under repair.

+ """ + user_id = self.env['res.users'].browse(uid) + if to_mail_ids: + template_id.write( + {'body_html': body_html, + 'subject': 'Equipment is under repairing.', + 'email_from': str(user_id.email), + 'email_to': to_mail_ids, + 'lang': 'lang' in context and + context.get('lang', 'en_US')}) + template_id.send_mail(self.id, force_send=True) + + def sts_out(self): + for equipment_rec in self: + equipment_rec.state = 'out_of_service' diff --git a/gym/models/project_document.py b/gym/models/project_document.py new file mode 100644 index 0000000..4e2567b --- /dev/null +++ b/gym/models/project_document.py @@ -0,0 +1,73 @@ +# -*- coding: utf-8 -*- + +from odoo import api, fields, models, _ +from datetime import date,datetime + +class ProjectDocument(models.Model): + + _name = 'project.document' + _description = "Documents" + _rec_name = "document_name_id" + + # -------------------------------------------------------------------- + # FIELDS + # -------------------------------------------------------------------- + + document_name_id = fields.Many2one( + comodel_name="project.document.name", + string='Document Name', + ) + + partner_id = fields.Many2one( + comodel_name='res.partner', + string='Partner', + ) + + datas = fields.Binary( + string='Document', + ) + + datas_fname = fields.Char('Filename') + + is_document_set = fields.Boolean( + string='Is Document Set', + compute='_compute_document_set', + store=True, + ) + + user_id = fields.Many2one( + comodel_name='res.users', + string='Uploaded By', + readonly=True, + ) + + date = fields.Datetime( + string='Date', + readonly=True, + ) + + # -------------------------------------------------------------------- + # METHODS + # -------------------------------------------------------------------- + + @api.depends('datas') + def _compute_document_set(self): + for doc in self: + if doc.datas: + doc.is_document_set = True + else: + doc.is_document_set = False + + @api.model + def create(self,vals): + if vals.get('datas'): + vals['user_id'] = self.env.user.id + vals['date'] = datetime.now() + res = super(ProjectDocument,self).create(vals) + return res + + def write(self, values): + if values.get('datas'): + values['user_id'] = self.env.user.id + values['date'] = datetime.now() + return super(ProjectDocument,self).write(values) \ No newline at end of file diff --git a/gym/models/project_document_case.py b/gym/models/project_document_case.py new file mode 100644 index 0000000..c0aac8e --- /dev/null +++ b/gym/models/project_document_case.py @@ -0,0 +1,72 @@ +# -*- coding: utf-8 -*- + +from odoo import api, fields, models, _ +from datetime import date,datetime + +class ProjectDocumentCase(models.Model): + + _name = 'project.document.case' + _description = "Case Related Documents" + _rec_name = "document_name_id" + + # -------------------------------------------------------------------- + # FIELDS + # -------------------------------------------------------------------- + + document_name_id = fields.Many2one( + comodel_name="project.document.name", + string='Document Name', + ) + + partner_id = fields.Many2one( + comodel_name='res.partner', + string='Partner', + ) + + datas = fields.Binary( + string='Document', + ) + + datas_fname = fields.Char('Filename') + + is_document_set = fields.Boolean( + string='Is Document Set', + compute='_compute_document_set', + store=True, + ) + + user_id = fields.Many2one( + comodel_name='res.users', + string='Uploaded By', + readonly=True, + ) + + date = fields.Datetime( + string='Date', + readonly=True, + ) + + # -------------------------------------------------------------------- + # METHODS + # -------------------------------------------------------------------- + @api.depends('datas') + def _compute_document_set(self): + for doc in self: + if doc.datas: + doc.is_document_set = True + else: + doc.is_document_set = False + + @api.model + def create(self,vals): + if vals.get('datas'): + vals['user_id'] = self.env.user.id + vals['date'] = datetime.now() + res = super(ProjectDocumentCase,self).create(vals) + return res + + def write(self, values): + if values.get('datas'): + values['user_id'] = self.env.user.id + values['date'] = datetime.now() + return super(ProjectDocumentCase,self).write(values) \ No newline at end of file diff --git a/gym/models/project_document_category.py b/gym/models/project_document_category.py new file mode 100644 index 0000000..e5db1a4 --- /dev/null +++ b/gym/models/project_document_category.py @@ -0,0 +1,16 @@ + +from odoo import api, fields, models, _ + +class ProjectDocumentCategory(models.Model): + + _name = 'project.document.category' + _description = "Documents Categories" + _rec_name = "name" + + # -------------------------------------------------------------------- + # FIELDS + # -------------------------------------------------------------------- + + name = fields.Char( + string='Name', + ) \ No newline at end of file diff --git a/gym/models/project_document_group.py b/gym/models/project_document_group.py new file mode 100644 index 0000000..c40646c --- /dev/null +++ b/gym/models/project_document_group.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- + +from odoo import api, fields, models, _ + +class ProjectDocumentGroup(models.Model): + + _name = 'project.document.group' + _description = "Documents Group" + _rec_name = "category_id" + + # -------------------------------------------------------------------- + # FIELDS + # -------------------------------------------------------------------- + + category_id = fields.Many2one( + comodel_name="project.document.category", + string='Category', + ) + + document_name_ids = fields.Many2many( + comodel_name="project.document.name", + string='Documents', + ) \ No newline at end of file diff --git a/gym/models/project_document_name.py b/gym/models/project_document_name.py new file mode 100644 index 0000000..dcf18d7 --- /dev/null +++ b/gym/models/project_document_name.py @@ -0,0 +1,17 @@ +# -*- coding: utf-8 -*- + +from odoo import api, fields, models, _ + +class ProjectDocumentName(models.Model): + + _name = 'project.document.name' + _description = "Documents Name" + _rec_name = "name" + + # -------------------------------------------------------------------- + # FIELDS + # -------------------------------------------------------------------- + + name = fields.Char( + string='Name', + ) \ No newline at end of file diff --git a/gym/models/project_document_opposite.py b/gym/models/project_document_opposite.py new file mode 100644 index 0000000..2aef3c3 --- /dev/null +++ b/gym/models/project_document_opposite.py @@ -0,0 +1,72 @@ +# -*- coding: utf-8 -*- + +from odoo import api, fields, models, _ +from datetime import date,datetime + +class ProjectDocumentOpposite(models.Model): + + _name = 'project.document.opposite' + _description = "Opposite Party Documents" + _rec_name = "document_name_id" + + # -------------------------------------------------------------------- + # FIELDS + # -------------------------------------------------------------------- + + document_name_id = fields.Many2one( + comodel_name="project.document.name", + string='Document Name', + ) + + partner_id = fields.Many2one( + comodel_name='res.partner', + string='Partner', + ) + + datas = fields.Binary( + string='Document', + ) + + datas_fname = fields.Char('Filename') + + is_document_set = fields.Boolean( + string='Is Document Set', + compute='_compute_document_set', + store=True, + ) + + user_id = fields.Many2one( + comodel_name='res.users', + string='Uploaded By', + readonly=True, + ) + + date = fields.Datetime( + string='Date', + readonly=True, + ) + + # -------------------------------------------------------------------- + # METHODS + # -------------------------------------------------------------------- + @api.depends('datas') + def _compute_document_set(self): + for doc in self: + if doc.datas: + doc.is_document_set = True + else: + doc.is_document_set = False + + @api.model + def create(self,vals): + if vals.get('datas'): + vals['user_id'] = self.env.user.id + vals['date'] = datetime.now() + res = super(ProjectDocumentOpposite,self).create(vals) + return res + + def write(self, values): + if values.get('datas'): + values['user_id'] = self.env.user.id + values['date'] = datetime.now() + return super(ProjectDocumentOpposite,self).write(values) \ No newline at end of file diff --git a/gym/models/project_other.py b/gym/models/project_other.py new file mode 100644 index 0000000..3ff3ad2 --- /dev/null +++ b/gym/models/project_other.py @@ -0,0 +1,73 @@ +# -*- coding: utf-8 -*- + +from odoo import api, fields, models, _ +from datetime import date,datetime + +class ProjectDocumentOther(models.Model): + + _name = 'project.document.other' + _description = "Other Documents" + _rec_name = "document_name_id" + + # -------------------------------------------------------------------- + # FIELDS + # -------------------------------------------------------------------- + + document_name_id = fields.Many2one( + comodel_name="project.document.name", + string='Document Name', + ) + + partner_id = fields.Many2one( + comodel_name='res.partner', + string='Partner', + ) + + datas = fields.Binary( + string='Document', + ) + + datas_fname = fields.Char('Filename') + + is_document_set = fields.Boolean( + string='Is Document Set', + compute='_compute_document_set', + store=True, + ) + + user_id = fields.Many2one( + comodel_name='res.users', + string='Uploaded By', + readonly=True, + ) + + date = fields.Datetime( + string='Date', + readonly=True, + ) + + # -------------------------------------------------------------------- + # METHODS + # -------------------------------------------------------------------- + + @api.depends('datas') + def _compute_document_set(self): + for doc in self: + if doc.datas: + doc.is_document_set = True + else: + doc.is_document_set = False + + @api.model + def create(self,vals): + if vals.get('datas'): + vals['user_id'] = self.env.user.id + vals['date'] = datetime.now() + res = super(ProjectDocumentOther,self).create(vals) + return res + + def write(self, values): + if values.get('datas'): + values['user_id'] = self.env.user.id + values['date'] = datetime.now() + return super(ProjectDocumentOther,self).write(values) \ No newline at end of file diff --git a/gym/models/project_task.py b/gym/models/project_task.py new file mode 100644 index 0000000..ff33822 --- /dev/null +++ b/gym/models/project_task.py @@ -0,0 +1,34 @@ +# See LICENSE file for full copyright and licensing details. + +from odoo import fields, models + + +class ProjectTask(models.Model): + """Inherited project task model for giving the task type whether the task + is of workout or Diet.""" + + _inherit = "project.task" + _order = 'schedule_date asc' + + schedule_date = fields.Date('Schedule Date', + help='Start date and Stop date of the Task') + reviewer_id = fields.Many2one('res.users', 'Specialist', + help='Reviewer of the Task') + task_type = fields.Selection([('workout', 'Workout'), ('diet', 'Diet')], + string='Type', + help='Type of the Task [workout]-If task is ' + 'of Workout Plan [diet]-If task is of ' + 'Diet Plan') + + +class ProjectProject(models.Model): + """Inherited project model for giving the project type whether the task + is of workout or Diet.""" + _inherit = 'project.project' + + type = fields.Selection([('workout', 'Workout'), ('diet', 'Diet')], 'Type', + default=lambda self: self.env.context. + get('workout_default', False) or False, + help='Type of the Project [workout] ' + '-If project is of Workout Plan [diet]-If ' + 'project is of Diet Plan') diff --git a/gym/models/res_partner_credit_card.py b/gym/models/res_partner_credit_card.py new file mode 100644 index 0000000..bf8f9c5 --- /dev/null +++ b/gym/models/res_partner_credit_card.py @@ -0,0 +1,40 @@ +# -*- coding: utf-8 -*- + +from odoo import api, fields, models, _ +from datetime import date +from odoo.exceptions import ValidationError + +class ResPartnerCreditCard(models.Model): + + _name = 'res.partner.credit.card' + _rec_name = 'name' + + # -------------------------------------------------------------------- + # FIELDS + # -------------------------------------------------------------------- + + name = fields.Char( + string='Name', + ) + + type_id = fields.Many2one( + comodel_name='res.partner.credit.card.type', + string='Type', + ) + + number = fields.Integer( + string='Number', + ) + + expiry_date = fields.Date( + string='Expiry Date' + ) + + ccb_number = fields.Char( + string='CCB Number', + ) + + partner_id = fields.Many2one( + comodel_name='res.partner', + string='Partner', + ) \ No newline at end of file diff --git a/gym/models/res_partner_credit_card_type.py b/gym/models/res_partner_credit_card_type.py new file mode 100644 index 0000000..5349925 --- /dev/null +++ b/gym/models/res_partner_credit_card_type.py @@ -0,0 +1,18 @@ +# -*- coding: utf-8 -*- + +from odoo import api, fields, models, _ +from datetime import date +from odoo.exceptions import ValidationError + +class ResPartnerCreditCardType(models.Model): + + _name = 'res.partner.credit.card.type' + _rec_name = 'name' + + # -------------------------------------------------------------------- + # FIELDS + # -------------------------------------------------------------------- + + name = fields.Char( + string='Name', + ) \ No newline at end of file diff --git a/gym/models/sale.py b/gym/models/sale.py new file mode 100644 index 0000000..dee600d --- /dev/null +++ b/gym/models/sale.py @@ -0,0 +1,73 @@ +# See LICENSE file for full copyright and licensing details. + +from odoo import api, fields, models, _ +from odoo.exceptions import ValidationError + + +class SaleOrder(models.Model): + """Imported sale order model.""" + + _inherit = 'sale.order' + + start_date = fields.Date('Start Date') + end_date = fields.Date('End Date') + membership = fields.Boolean(string='Membership', + help='Check if the Customer Wants to Buy ' + 'membership.') + + @api.model + def create(self, values): + rec = super(SaleOrder, self).create(values) + if rec.membership and not rec.partner_id.is_member: + rec.partner_id.is_member = True + rec.partner_id.membership_number = self.env[ + 'ir.sequence'].next_by_code('membership.number') + return rec + + def write(self, values): + for rec in self: + if values.get('partner_id'): + partner_id =\ + self.env['res.partner'].browse(values.get('partner_id')) + else: + partner_id = rec.partner_id + if values.get('membership', rec.membership) and not \ + partner_id.is_member: + partner_id.is_member = True + return super(SaleOrder, self).write(values) + + @api.constrains('order_line', 'membership') + def _check_order_line_membership(self): + """Membership product constraint.""" + if self.membership and len([rec for rec in self.order_line.filtered( + lambda rec: + rec.product_id.product_tmpl_id.is_membership)]) > 1: + raise ValidationError( + _("You can\'t select more than one membership product.")) + + @api.constrains('start_date', 'end_date') + def _check_date(self): + """Membership date constraint.""" + if self.membership and self.start_date > self.end_date: + raise ValidationError( + _("End date must be greater than start date")) + + def action_confirm(self): + """Create membership line when confirm sale order.""" + res = super(SaleOrder, self).action_confirm() + for order in self: + if order.membership and order.state == 'sale' and not \ + order._context.get('is_membership_created'): + for line_rec in order.order_line: + if line_rec.product_id.product_tmpl_id.is_membership: + membership_rec = \ + self.env['membership.membership_line'].create({ + 'partner': order.partner_id.id, + 'date': order.start_date, + 'end_date': order.end_date, + 'member_price': line_rec.price_subtotal, + 'membership_id': line_rec.product_id.id, + 'sale_order_id': order.id, + }) + membership_rec.action_confirm() + return res diff --git a/gym/models/trainer.py b/gym/models/trainer.py new file mode 100644 index 0000000..d83d133 --- /dev/null +++ b/gym/models/trainer.py @@ -0,0 +1,66 @@ +# See LICENSE file for full copyright and licensing details. + +from odoo import api, fields, models, _ +from odoo.exceptions import ValidationError + + +class HrEmployee(models.Model): + """Inherited this model for trainer's information.""" + + _inherit = 'hr.employee' + + is_trainer = fields.Boolean(string='Is Trainer ?') + specialist_ids = fields.Many2many('gym.skills', 'trainer_skill_rel', + 'trainer_id', 'skill_id', + string='Specialization') + total_session = fields.Integer( + compute='_compute_calculation_trainer_session', + string='Total Session') + user_id = fields.Many2one('res.users', 'User', + related='resource_id.user_id', store=True, + readonly=False, ondelete="cascade") + + def unlink(self): + for rec in self: + user_id = rec.user_id + rec.user_id = False + user_id.unlink() + return super(HrEmployee, self).unlink() + + def _compute_calculation_trainer_session(self): + """Trainer session count for session smart + button in trainer form(hr.employee).""" + for trainer_rec in self: + trainer_rec.total_session = \ + self.env['calendar.event'].search_count([ + ('trainer_id', '=', trainer_rec.id)]) + + @api.constrains('work_email') + def _check_work_email(self): + rec = self.search([('work_email', '=', self.work_email), + ('id', '!=', self.id)]) + if rec: + raise ValidationError(_("You can not have two users with the " + "same login !")) + + @api.model + def create(self, vals): + """Method for creating User at trainer creation.""" + res = super(HrEmployee, self).create(vals) + if not vals.get('user_id'): + user = self.env['res.users'].create({ + 'name': vals.get('name'), + 'login': vals.get('work_email', False), + 'password': self.env.user.company_id.default_password or '', + 'groups_id': [(6, 0, [self.env.ref( + 'gym.group_gym_trainer').id])], + }) + if user and user.partner_id: + user.partner_id.write({'email': vals.get('work_email', False)}) + res.write({'user_id': user and user.id or False}) + return res + + def copy(self, default=None): + if self.is_trainer: + raise ValidationError(_("Sorry, you can't duplicate a trainer. ")) + return super(HrEmployee, self).copy(default) diff --git a/gym/models/workout.py b/gym/models/workout.py new file mode 100644 index 0000000..9e77d6c --- /dev/null +++ b/gym/models/workout.py @@ -0,0 +1,78 @@ +# See LICENSE file for full copyright and licensing details. + +from odoo import fields, models + + +class ExerciseLines(models.Model): + """Information about body parts and exercise.""" + + _name = 'exercise.lines' + _description = "Exercise Lines" + + exercise_name_id = fields.Many2one('exercise.exercise', 'Exercise name') + sets = fields.Integer('Sets') + reps_ids = fields.Many2many('repeat.repeat', 'exercise_repeat_rel', + string="Repetition") + sequence = fields.Integer('Sequence') + + +class RepeatRepeat(models.Model): + _name = 'repeat.repeat' + _description = "Repeated" + + name = fields.Integer('Reps', required=1) + + +class ExerciseExercise(models.Model): + """Information about Exercise and Equipment.""" + + _name = 'exercise.exercise' + _description = "Exercise Exercise" + + name = fields.Char('Name') + exercise_type_ids = fields.Many2many( + 'exercise.type', string='Exercise For') + equipment_id = fields.Many2one('product.template', 'Equipment') + exercise_images_ids = fields.Many2many('ir.attachment', string='Images') + exercise_images_ids = fields.One2many( + 'ir.attachment', + 'exercise_id', + string='Attachment', + ) + + benefits = fields.Text('Benefits of Exercise') + steps = fields.Text('Steps To Follow') + exercise_video_ids = fields.One2many( + 'exercise.videos', 'exercise_id', 'Videos') + + +class Attachment(models.Model): + _inherit = 'ir.attachment' + _description = 'Ir Attachment' + + exercise_id = fields.Many2one( + 'exercise.exercise', + string='Exercise', + ) + + # @api.onchange('datas') + # def _onchange_datas(self): + # self.name = self.datas + + +class ExerciseType(models.Model): + _name = 'exercise.type' + _description = "Exercise Type" + + name = fields.Char('Name', required=1) + + +class ExerciseVideos(models.Model): + """Model for Exercise Videos.""" + + _name = 'exercise.videos' + _description = "Exercise Videos" + + name = fields.Char('Name', required=True) + link = fields.Char('Link', required=True) + exercise_id = fields.Many2one('exercise.exercise', 'Exercises') diff --git a/gym/security/ir.model.access.csv b/gym/security/ir.model.access.csv new file mode 100644 index 0000000..54ed0dc --- /dev/null +++ b/gym/security/ir.model.access.csv @@ -0,0 +1,79 @@ +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink +access_body_measurement,access.body.measurement,model_body_measurement,base.group_user,1,0,0,0 +access_exercise_type,access.exercise.type,model_exercise_type,base.group_user,1,1,1,1 +access_exercise_exercise,access.exercise.exercise,model_exercise_exercise,base.group_user,1,1,1,1 +access_exercise_lines,access.exercise.lines,model_exercise_lines,base.group_user,1,1,1,1 +access_gym_skills,access.gym.skills,model_gym_skills,base.group_user,1,1,1,1 +access_food_item,access.food.item,model_food_item,base.group_user,1,1,1,1 +access_exercise_videos,access.exercise.videos,model_exercise_videos,base.group_user,1,1,1,1 +access_body_part,access.body.part,model_body_part,base.group_user,1,1,1,1 +access_diet_plan,access.diet.plan,model_diet_plan,base.group_user,1,1,1,1 +access_diet_plan_lines,access.diet.plan.lines,model_diet_plan_lines,base.group_user,1,1,1,1 +access_pedo_meter,access.pedo.meter,model_pedo_meter,base.group_user,1,1,1,1 +access_body_measurement_trainer,access.body.measurement.trainer,model_body_measurement,gym.group_gym_trainer,1,0,0,0 +access_exercise_type_trainer,access.exercise.type.trainer,model_exercise_type,gym.group_gym_trainer,1,1,1,1 +access_exercise_exercise_trainer,access.exercise.exercise.trainer,model_exercise_exercise,gym.group_gym_trainer,1,1,1,1 +access_exercise_lines_trainer,access.exercise.lines.trainer,model_exercise_lines,gym.group_gym_trainer,1,1,1,1 +access_gym_skills_trainer,access.gym.skills.trainer,model_gym_skills,gym.group_gym_trainer,1,1,1,1 +access_food_item_trainer,access.food.item.trainer,model_food_item,gym.group_gym_trainer,1,1,1,1 +access_exercise_videos_trainer,access.exercise.videos.trainer,model_exercise_videos,gym.group_gym_trainer,1,1,1,1 +access_body_part_trainer,access.body.part.trainer,model_body_part,gym.group_gym_trainer,1,1,1,1 +access_diet_plan_trainer,access.diet.plan.trainer,model_diet_plan,gym.group_gym_trainer,1,1,1,1 +access_diet_plan_lines_trainer,access.diet.plan.lines.trainer,model_diet_plan_lines,gym.group_gym_trainer,1,1,1,1 +access_pedo_meter_trainer,access.pedo.meter.trainer,model_pedo_meter,gym.group_gym_trainer,1,0,0,0 +access_body_measurement_member,access.body.measurement.member,model_body_measurement,gym.group_gym_member,1,0,0,0 +access_exercise_type_member,access.exercise.type.member,model_exercise_type,gym.group_gym_member,1,0,0,0 +access_exercise_exercise_member,access.exercise.exercise.member,model_exercise_exercise,gym.group_gym_member,1,0,0,0 +access_exercise_lines_member,access.exercise.lines.member,model_exercise_lines,gym.group_gym_member,1,0,0,0 +access_gym_skills_member,access.gym.skills.member,model_gym_skills,gym.group_gym_member,1,0,0,0 +access_food_item_member,access.food.item.member,model_food_item,gym.group_gym_member,1,0,0,0 +access_body_part_member,access.body.part.member,model_body_part,gym.group_gym_member,1,0,0,0 +access_diet_plan_member,access.diet.plan.member,model_diet_plan,gym.group_gym_member,1,0,0,0 +access_diet_plan_lines_member,access.diet.plan.lines.member,model_diet_plan_lines,gym.group_gym_member,1,0,0,0 +access_membership_member_member,access.membership.member.member,model_membership_membership_line,gym.group_gym_member,1,0,0,0 +access_exercise_videos_member,access.exercise.videos.member,model_exercise_videos,gym.group_gym_member,1,0,0,0 +access_pedo_meter_member,access.pedo.meter.member,model_pedo_meter,gym.group_gym_member,1,1,1,0 +access_calendar_event_member,access.calendar.event.member,calendar.model_calendar_event,gym.group_gym_member,1,0,1,0 +access_body_measurement_operator,Access.body.measurement.operator,model_body_measurement,gym.group_gym_operator,1,1,1,1 +access_exercise_type_operator,access.exercise.type.operator,model_exercise_type,gym.group_gym_operator,1,1,1,1 +access_exercise_exercise_operator,access.exercise.exercise.operator,model_exercise_exercise,gym.group_gym_operator,1,1,1,1 +access_exercise_lines_operator,access.exercise.lines.operator,model_exercise_lines,gym.group_gym_operator,1,1,1,1 +access_gym_skills_operator,access.gym.skills.operator,model_gym_skills,gym.group_gym_operator,1,1,1,1 +access_food_item_operator,access.food.item.operator,model_food_item,gym.group_gym_operator,1,1,1,1 +access_body_part_operator,access.body.part.operator,model_body_part,gym.group_gym_operator,1,1,1,1 +access_diet_plan_operator,access.diet.plan.operator,model_diet_plan,gym.group_gym_operator,1,1,1,1 +access_diet_plan_lines_operator,access.diet.plan.lines.operator,model_diet_plan_lines,gym.group_gym_operator,1,1,1,1 +access_membership_member_operator,access.membership.member.operator,model_membership_membership_line,gym.group_gym_operator,1,1,1,1 +access_exercise_videos_operator,access.exercise.videos.operator,model_exercise_videos,gym.group_gym_operator,1,1,1,1 +access_pedo_meter_operator,access.pedo.meter.operator,model_pedo_meter,gym.group_gym_operator,1,1,1,1 +access_body_measurement_manager,Access.body.measurement.manager,model_body_measurement,gym.group_gym_manager,1,1,1,1 +access_exercise_type_manager,access.exercise.type.manager,model_exercise_type,gym.group_gym_manager,1,1,1,1 +access_exercise_exercise_manager,access.exercise.exercise.manager,model_exercise_exercise,gym.group_gym_manager,1,1,1,1 +access_exercise_lines_manager,access.exercise.lines.manager,model_exercise_lines,gym.group_gym_manager,1,1,1,1 +access_gym_skills_manager,access.gym.skills.manager,model_gym_skills,gym.group_gym_manager,1,1,1,1 +access_food_item_manager,access.food.item.manager,model_food_item,gym.group_gym_manager,1,1,1,1 +access_body_part_manager,access.body.part.manager,model_body_part,gym.group_gym_manager,1,1,1,1 +access_diet_plan_manager,access.diet.planmanager,model_diet_plan,gym.group_gym_manager,1,1,1,1 +access_diet_plan_lines_manager,access.diet.plan.lines.manager,model_diet_plan_lines,gym.group_gym_manager,1,1,1,1 +access_membership_member_manager,access.membership.member.manager,model_membership_membership_line,gym.group_gym_manager,1,1,1,1 +access_exercise_videos_manager,access.exercise.videos.manager,model_exercise_videos,gym.group_gym_manager,1,1,1,1 +access_pedo_meter_manager,access.pedo.meter.manager,model_pedo_meter,gym.group_gym_manager,1,1,1,1 +access_resource_calendar_operator,access.resource.calendar.operator,resource.model_resource_calendar,gym.group_gym_operator,1,1,1,1 +access_resource_calendar_attendance_operator,access.resource.calendar.attendance.operator,resource.model_resource_calendar_attendance,gym.group_gym_operator,1,1,1,1 +access_res_users_operator,access.res.users.operator,base.model_res_users,gym.group_gym_operator,1,1,1,1 +calendar.access_calendar_event_all_employee,calendar.event_all_employee,calendar.model_calendar_event,base.group_user,1,0,1,0 +membership.access_membership_membership_line_partner_manager,membership.membership.line.partner.manager,membership.model_membership_membership_line,base.group_partner_manager,1,0,0,0 +project.access_project_task,project.task,project.model_project_task,project.group_project_user,1,1,1,0 +access_product_template_operator,access.product.template operator,product.model_product_template,gym.group_gym_operator,1,1,1,0 +access_product_product_operator,access.product.product.operator,product.model_product_product,gym.group_gym_operator,1,1,1,0 +access_repeat_repeat,access.repeat.repeat,model_repeat_repeat,base.group_user,1,1,1,1 +access_hr_emp_group_gym_trainer,access.group_gym_trainer,model_hr_employee,gym.group_gym_trainer,1,1,0,0 +access_project_document,access_project_document,model_project_document,base.group_user,1,1,1,1 +access_project_document_case,access_project_document_case,model_project_document_case,base.group_user,1,1,1,1 +access_project_document_category,access_project_document_category,model_project_document_category,base.group_user,1,1,1,1 +access_project_document_group,access_project_document_group,model_project_document_group,base.group_user,1,1,1,1 +access_project_document_name,access_project_document_name,model_project_document_name,base.group_user,1,1,1,1 +access_project_document_opposite,access_project_document_opposite,model_project_document_opposite,base.group_user,1,1,1,1 +access_project_document_other,access_project_document_other,model_project_document_other,base.group_user,1,1,1,1 +access_res_partner_credit_card,access_res_partner_credit_card,model_res_partner_credit_card,base.group_user,1,1,1,1 +access_res_partner_credit_card_type,access_res_partner_credit_card_type,model_res_partner_credit_card_type,base.group_user,1,1,1,1 \ No newline at end of file diff --git a/gym/security/security.xml b/gym/security/security.xml new file mode 100644 index 0000000..36bed51 --- /dev/null +++ b/gym/security/security.xml @@ -0,0 +1,130 @@ + + + + + Menu Visible + + + + + Member + + + + + Trainer + + + + + + Operator + + + + + + Gym Manager + + + + + + + Rule for Member viewing his Tasks + + + [('user_id','=',user.id)] + + + + + Rule for Member viewing his Projects + + + [('partner_id','=',user.partner_id.id)] + + + + + + + + + + Rule for Member viewing his Record + + + [('id','=',user.partner_id.id)] + + + + + Rule for Manager viewing all Record + + + [(1,'=',1)] + + + + + Rule for Member viewing his User Record + + + [('id','=',user.id)] + + + + + Rule for Member viewing his Membership + + + [('partner','=',user.partner_id.id)] + + + + + Rule for Trainer viewing his Record + + + [('user_id','=',user.id)] + + + + + Rule for Trainer viewing his Bookings + + + [('trainer_id.user_id','=',user.id)] + + + + + All Calendar Event for employees + [(1,'=',1)] + + + + + + + Rule for viewing his Measurement history + + + [('partner_id','=',user.partner_id.id)] + + + diff --git a/gym/static/description/fb.jpg b/gym/static/description/fb.jpg new file mode 100644 index 0000000..8fa52d3 Binary files /dev/null and b/gym/static/description/fb.jpg differ diff --git a/gym/static/description/gym.jpg b/gym/static/description/gym.jpg new file mode 100644 index 0000000..aa467ad Binary files /dev/null and b/gym/static/description/gym.jpg differ diff --git a/gym/static/description/icon.png b/gym/static/description/icon.png new file mode 100644 index 0000000..f5280d1 Binary files /dev/null and b/gym/static/description/icon.png differ diff --git a/gym/static/description/icon2.png b/gym/static/description/icon2.png new file mode 100644 index 0000000..2a89e66 Binary files /dev/null and b/gym/static/description/icon2.png differ diff --git a/gym/static/description/icon3.png b/gym/static/description/icon3.png new file mode 100644 index 0000000..074e17e Binary files /dev/null and b/gym/static/description/icon3.png differ diff --git a/gym/static/description/img/emp-1.jpg b/gym/static/description/img/emp-1.jpg new file mode 100644 index 0000000..a95e2a7 Binary files /dev/null and b/gym/static/description/img/emp-1.jpg differ diff --git a/gym/static/description/img/emp-2.jpeg b/gym/static/description/img/emp-2.jpeg new file mode 100644 index 0000000..6662360 Binary files /dev/null and b/gym/static/description/img/emp-2.jpeg differ diff --git a/gym/static/description/img/emp-3.jpeg b/gym/static/description/img/emp-3.jpeg new file mode 100644 index 0000000..8ff11ce Binary files /dev/null and b/gym/static/description/img/emp-3.jpeg differ diff --git a/gym/static/description/img/emp-4.jpeg b/gym/static/description/img/emp-4.jpeg new file mode 100644 index 0000000..36b1304 Binary files /dev/null and b/gym/static/description/img/emp-4.jpeg differ diff --git a/gym/static/description/img/emp-5.jpeg b/gym/static/description/img/emp-5.jpeg new file mode 100644 index 0000000..c5c04c5 Binary files /dev/null and b/gym/static/description/img/emp-5.jpeg differ diff --git a/gym/static/description/img/emp-6.jpeg b/gym/static/description/img/emp-6.jpeg new file mode 100644 index 0000000..6d61e04 Binary files /dev/null and b/gym/static/description/img/emp-6.jpeg differ diff --git a/gym/static/description/img/emp-7.jpeg b/gym/static/description/img/emp-7.jpeg new file mode 100644 index 0000000..5888227 Binary files /dev/null and b/gym/static/description/img/emp-7.jpeg differ diff --git a/gym/static/description/img/emp-8.jpeg b/gym/static/description/img/emp-8.jpeg new file mode 100644 index 0000000..05d0438 Binary files /dev/null and b/gym/static/description/img/emp-8.jpeg differ diff --git a/gym/static/description/img/emp-9.jpeg b/gym/static/description/img/emp-9.jpeg new file mode 100644 index 0000000..71c30d2 Binary files /dev/null and b/gym/static/description/img/emp-9.jpeg differ diff --git a/gym/static/description/img/equipment.png b/gym/static/description/img/equipment.png new file mode 100644 index 0000000..36368e3 Binary files /dev/null and b/gym/static/description/img/equipment.png differ diff --git a/gym/static/description/img/exer-img.png b/gym/static/description/img/exer-img.png new file mode 100644 index 0000000..fb6b06b Binary files /dev/null and b/gym/static/description/img/exer-img.png differ diff --git a/gym/static/description/img/exercise.png b/gym/static/description/img/exercise.png new file mode 100644 index 0000000..32b1bbf Binary files /dev/null and b/gym/static/description/img/exercise.png differ diff --git a/gym/static/description/img/gym1.png b/gym/static/description/img/gym1.png new file mode 100644 index 0000000..68a0cf6 Binary files /dev/null and b/gym/static/description/img/gym1.png differ diff --git a/gym/static/description/img/gym2.png b/gym/static/description/img/gym2.png new file mode 100644 index 0000000..43c2a8b Binary files /dev/null and b/gym/static/description/img/gym2.png differ diff --git a/gym/static/description/img/gym3.png b/gym/static/description/img/gym3.png new file mode 100644 index 0000000..b20770d Binary files /dev/null and b/gym/static/description/img/gym3.png differ diff --git a/gym/static/description/img/measure_graph.png b/gym/static/description/img/measure_graph.png new file mode 100644 index 0000000..7ef738d Binary files /dev/null and b/gym/static/description/img/measure_graph.png differ diff --git a/gym/static/description/img/measurement.png b/gym/static/description/img/measurement.png new file mode 100644 index 0000000..b4812a1 Binary files /dev/null and b/gym/static/description/img/measurement.png differ diff --git a/gym/static/description/img/member_kanban.png b/gym/static/description/img/member_kanban.png new file mode 100644 index 0000000..010dad8 Binary files /dev/null and b/gym/static/description/img/member_kanban.png differ diff --git a/gym/static/description/img/membership-2.png b/gym/static/description/img/membership-2.png new file mode 100644 index 0000000..2e38e2d Binary files /dev/null and b/gym/static/description/img/membership-2.png differ diff --git a/gym/static/description/img/pi-2.png b/gym/static/description/img/pi-2.png new file mode 100644 index 0000000..dc571c9 Binary files /dev/null and b/gym/static/description/img/pi-2.png differ diff --git a/gym/static/description/img/pi-4.png b/gym/static/description/img/pi-4.png new file mode 100644 index 0000000..66f842c Binary files /dev/null and b/gym/static/description/img/pi-4.png differ diff --git a/gym/static/description/img/pi.png b/gym/static/description/img/pi.png new file mode 100644 index 0000000..a8fdf9b Binary files /dev/null and b/gym/static/description/img/pi.png differ diff --git a/gym/static/description/img/pivot.png b/gym/static/description/img/pivot.png new file mode 100644 index 0000000..43182df Binary files /dev/null and b/gym/static/description/img/pivot.png differ diff --git a/gym/static/description/img/serpent32.png b/gym/static/description/img/serpent32.png new file mode 100644 index 0000000..14612ca Binary files /dev/null and b/gym/static/description/img/serpent32.png differ diff --git a/gym/static/description/img/skill-2.png b/gym/static/description/img/skill-2.png new file mode 100644 index 0000000..58c4e72 Binary files /dev/null and b/gym/static/description/img/skill-2.png differ diff --git a/gym/static/description/img/skill.png b/gym/static/description/img/skill.png new file mode 100644 index 0000000..8c221d6 Binary files /dev/null and b/gym/static/description/img/skill.png differ diff --git a/gym/static/description/img/step-1.png b/gym/static/description/img/step-1.png new file mode 100644 index 0000000..b6ad333 Binary files /dev/null and b/gym/static/description/img/step-1.png differ diff --git a/gym/static/description/img/trainer-2.png b/gym/static/description/img/trainer-2.png new file mode 100644 index 0000000..22c0a90 Binary files /dev/null and b/gym/static/description/img/trainer-2.png differ diff --git a/gym/static/description/in.jpg b/gym/static/description/in.jpg new file mode 100644 index 0000000..d9b9a80 Binary files /dev/null and b/gym/static/description/in.jpg differ diff --git a/gym/static/description/index.html b/gym/static/description/index.html new file mode 100644 index 0000000..09a5631 --- /dev/null +++ b/gym/static/description/index.html @@ -0,0 +1,453 @@ + + + +

+
+
+ +
+
+
+
+

+ GYM Management +

+
+
+

+ This modules implements GYM management system with the following entities, +

+
+
+ + Member +
    +
  • + + Member can access his Membership details. +
  • +
  • + + He can check his Workout and Diet Plans. +
  • +
  • + + He can track his body measurement history. +
  • +
+
+
+ + Trainer +
    +
  • + + Trainers can create workout and diet plans. +
  • +
+
+
+ + Operator +
    +
  • + + Operator can access all the membership information. +
  • +
  • + + Manage Members +
  • +
+
+
+ + + +
+ +
+

+ Manage Members +

+
+
+
    +
  • +

    Efficiently manage all the members in your gym.

    +
  • +
  • +

    Directly create new member into the + system when you convert a lead into opportunity.

    +
  • +
+
+
+ +
+
+

+ Memberships +

+
+
+
    +
  • +

    Directly create a new membership for + the member from Quotation upon sale confirmation.

    +
  • +
  • +

    Track the various stages of the + Membership lifecycle.

    +
  • +
+
+
+ +
+
+

+ Measurement History with BMI and BMR calculation +

+
+
+
    +
  • +

    Efficiently track the body measurement growth of the member.

    +
  • +
  • +

    BMI analyse it on graph and see how good they perform.

    +
  • +
  • +

    You can configure the default measurement units in your company profile.

    +
  • +
+
+
+ +
+
+ +
+
+ +
+
+

+ Manage Trainers +

+
+
+
    +
  • +

    Easily manage your gym trainers. + You can categories the trainers according to their skills. +

    +
  • +
+
+
+ +
+
+ +
+
+

+ GYM Equipments +

+
+
+
    +
  • +

    Manage your gym equipments. Set them as out of + service or in maintenance. +

    +
  • +
+
+
+ +
+
+

+ Exercises +

+
+
+
    +
  • +

    Configure various exercises, add the steps to be followed and their benefits. +

    +
  • +
  • +

    You can also add images and video links for better understanding. +

    +
  • +
+
+
+ +
+
+ +
+
+ +
+ +
+
+ + +
+
+

Check out our + various Odoo Services below

+
+
+ +
+
+

Check out our various + Odoo Based Products

+
+
+ +
+
+

For any questions, + support and development contact us.

+
+
+ +
+
+

(+91) 98793-54457, (+91) 90334-72982 + +91-79-2975-0867 +

+ WhatsApp, Telegram or Call 24X7 +
+
+
+
+
+ + + + + + + + + + + +
+
+
+ + diff --git a/gym/static/description/insta.jpg b/gym/static/description/insta.jpg new file mode 100644 index 0000000..c89a251 Binary files /dev/null and b/gym/static/description/insta.jpg differ diff --git a/gym/static/description/odooqa32.png b/gym/static/description/odooqa32.png new file mode 100644 index 0000000..b0db6c2 Binary files /dev/null and b/gym/static/description/odooqa32.png differ diff --git a/gym/static/description/serpent32.png b/gym/static/description/serpent32.png new file mode 100644 index 0000000..14612ca Binary files /dev/null and b/gym/static/description/serpent32.png differ diff --git a/gym/static/description/serpent_logo.png b/gym/static/description/serpent_logo.png new file mode 100644 index 0000000..68dacf8 Binary files /dev/null and b/gym/static/description/serpent_logo.png differ diff --git a/gym/static/description/twitter.jpg b/gym/static/description/twitter.jpg new file mode 100644 index 0000000..6d938f6 Binary files /dev/null and b/gym/static/description/twitter.jpg differ diff --git a/gym/static/description/youtube.jpg b/gym/static/description/youtube.jpg new file mode 100644 index 0000000..05382a7 Binary files /dev/null and b/gym/static/description/youtube.jpg differ diff --git a/gym/static/image/banana.jpeg b/gym/static/image/banana.jpeg new file mode 100644 index 0000000..d126664 Binary files /dev/null and b/gym/static/image/banana.jpeg differ diff --git a/gym/static/image/bench-1.jpeg b/gym/static/image/bench-1.jpeg new file mode 100644 index 0000000..7d27503 Binary files /dev/null and b/gym/static/image/bench-1.jpeg differ diff --git a/gym/static/image/bench-2.jpeg b/gym/static/image/bench-2.jpeg new file mode 100644 index 0000000..74fe22c Binary files /dev/null and b/gym/static/image/bench-2.jpeg differ diff --git a/gym/static/image/bench-3.jpeg b/gym/static/image/bench-3.jpeg new file mode 100644 index 0000000..2a0b1de Binary files /dev/null and b/gym/static/image/bench-3.jpeg differ diff --git a/gym/static/image/bread.jpeg b/gym/static/image/bread.jpeg new file mode 100644 index 0000000..bf6999e Binary files /dev/null and b/gym/static/image/bread.jpeg differ diff --git a/gym/static/image/brocali.jpeg b/gym/static/image/brocali.jpeg new file mode 100644 index 0000000..e2fcf1e Binary files /dev/null and b/gym/static/image/brocali.jpeg differ diff --git a/gym/static/image/browen_rice.jpeg b/gym/static/image/browen_rice.jpeg new file mode 100644 index 0000000..69fd0d0 Binary files /dev/null and b/gym/static/image/browen_rice.jpeg differ diff --git a/gym/static/image/butter_milk.jpeg b/gym/static/image/butter_milk.jpeg new file mode 100644 index 0000000..53b7a32 Binary files /dev/null and b/gym/static/image/butter_milk.jpeg differ diff --git a/gym/static/image/chese.jpeg b/gym/static/image/chese.jpeg new file mode 100644 index 0000000..2f3b55e Binary files /dev/null and b/gym/static/image/chese.jpeg differ diff --git a/gym/static/image/chikki.jpeg b/gym/static/image/chikki.jpeg new file mode 100644 index 0000000..a2982a3 Binary files /dev/null and b/gym/static/image/chikki.jpeg differ diff --git a/gym/static/image/cookies.jpeg b/gym/static/image/cookies.jpeg new file mode 100644 index 0000000..746cced Binary files /dev/null and b/gym/static/image/cookies.jpeg differ diff --git a/gym/static/image/curd.jpeg b/gym/static/image/curd.jpeg new file mode 100644 index 0000000..aab2eb8 Binary files /dev/null and b/gym/static/image/curd.jpeg differ diff --git a/gym/static/image/dal.jpeg b/gym/static/image/dal.jpeg new file mode 100644 index 0000000..2432068 Binary files /dev/null and b/gym/static/image/dal.jpeg differ diff --git a/gym/static/image/diet.jpg b/gym/static/image/diet.jpg new file mode 100644 index 0000000..f40c56c Binary files /dev/null and b/gym/static/image/diet.jpg differ diff --git a/gym/static/image/dubfly-1.jpeg b/gym/static/image/dubfly-1.jpeg new file mode 100644 index 0000000..e354b8a Binary files /dev/null and b/gym/static/image/dubfly-1.jpeg differ diff --git a/gym/static/image/dumfly-34.jpeg b/gym/static/image/dumfly-34.jpeg new file mode 100644 index 0000000..bd7cb91 Binary files /dev/null and b/gym/static/image/dumfly-34.jpeg differ diff --git a/gym/static/image/dumfly.jpeg b/gym/static/image/dumfly.jpeg new file mode 100644 index 0000000..8dd3e02 Binary files /dev/null and b/gym/static/image/dumfly.jpeg differ diff --git a/gym/static/image/egg.jpeg b/gym/static/image/egg.jpeg new file mode 100644 index 0000000..56e34d1 Binary files /dev/null and b/gym/static/image/egg.jpeg differ diff --git a/gym/static/image/emp-1.jpeg b/gym/static/image/emp-1.jpeg new file mode 100644 index 0000000..6cdabd3 Binary files /dev/null and b/gym/static/image/emp-1.jpeg differ diff --git a/gym/static/image/emp-2.jpeg b/gym/static/image/emp-2.jpeg new file mode 100644 index 0000000..0989844 Binary files /dev/null and b/gym/static/image/emp-2.jpeg differ diff --git a/gym/static/image/fish.jpeg b/gym/static/image/fish.jpeg new file mode 100644 index 0000000..cabb99d Binary files /dev/null and b/gym/static/image/fish.jpeg differ diff --git a/gym/static/image/fruits.jpeg b/gym/static/image/fruits.jpeg new file mode 100644 index 0000000..15913c5 Binary files /dev/null and b/gym/static/image/fruits.jpeg differ diff --git a/gym/static/image/grain_bread.jpeg b/gym/static/image/grain_bread.jpeg new file mode 100644 index 0000000..07d68ae Binary files /dev/null and b/gym/static/image/grain_bread.jpeg differ diff --git a/gym/static/image/images.jpeg b/gym/static/image/images.jpeg new file mode 100644 index 0000000..3e4cb04 Binary files /dev/null and b/gym/static/image/images.jpeg differ diff --git a/gym/static/image/index1.png b/gym/static/image/index1.png new file mode 100644 index 0000000..6adb5d2 Binary files /dev/null and b/gym/static/image/index1.png differ diff --git a/gym/static/image/lean_roast_beef.jpeg b/gym/static/image/lean_roast_beef.jpeg new file mode 100644 index 0000000..0391f67 Binary files /dev/null and b/gym/static/image/lean_roast_beef.jpeg differ diff --git a/gym/static/image/lussi.jpeg b/gym/static/image/lussi.jpeg new file mode 100644 index 0000000..cdccf5a Binary files /dev/null and b/gym/static/image/lussi.jpeg differ diff --git a/gym/static/image/man.jpeg b/gym/static/image/man.jpeg new file mode 100644 index 0000000..d6feee2 Binary files /dev/null and b/gym/static/image/man.jpeg differ diff --git a/gym/static/image/manager.jpeg b/gym/static/image/manager.jpeg new file mode 100644 index 0000000..1995a11 Binary files /dev/null and b/gym/static/image/manager.jpeg differ diff --git a/gym/static/image/melon.jpeg b/gym/static/image/melon.jpeg new file mode 100644 index 0000000..0e2b6f3 Binary files /dev/null and b/gym/static/image/melon.jpeg differ diff --git a/gym/static/image/mem-1.jpeg b/gym/static/image/mem-1.jpeg new file mode 100644 index 0000000..11bbed0 Binary files /dev/null and b/gym/static/image/mem-1.jpeg differ diff --git a/gym/static/image/mem-2.jpeg b/gym/static/image/mem-2.jpeg new file mode 100644 index 0000000..5888227 Binary files /dev/null and b/gym/static/image/mem-2.jpeg differ diff --git a/gym/static/image/mem-3.jpeg b/gym/static/image/mem-3.jpeg new file mode 100644 index 0000000..b868bdc Binary files /dev/null and b/gym/static/image/mem-3.jpeg differ diff --git a/gym/static/image/member.jpeg b/gym/static/image/member.jpeg new file mode 100644 index 0000000..f5a05be Binary files /dev/null and b/gym/static/image/member.jpeg differ diff --git a/gym/static/image/milk.jpeg b/gym/static/image/milk.jpeg new file mode 100644 index 0000000..e292423 Binary files /dev/null and b/gym/static/image/milk.jpeg differ diff --git a/gym/static/image/oats.jpeg b/gym/static/image/oats.jpeg new file mode 100644 index 0000000..e54de3f Binary files /dev/null and b/gym/static/image/oats.jpeg differ diff --git a/gym/static/image/ope-1.jpeg b/gym/static/image/ope-1.jpeg new file mode 100644 index 0000000..0922f08 Binary files /dev/null and b/gym/static/image/ope-1.jpeg differ diff --git a/gym/static/image/operator.jpeg b/gym/static/image/operator.jpeg new file mode 100644 index 0000000..47336e2 Binary files /dev/null and b/gym/static/image/operator.jpeg differ diff --git a/gym/static/image/paratha.jpeg b/gym/static/image/paratha.jpeg new file mode 100644 index 0000000..b97c16f Binary files /dev/null and b/gym/static/image/paratha.jpeg differ diff --git a/gym/static/image/penuats.jpeg b/gym/static/image/penuats.jpeg new file mode 100644 index 0000000..f9e35af Binary files /dev/null and b/gym/static/image/penuats.jpeg differ diff --git a/gym/static/image/poha.jpeg b/gym/static/image/poha.jpeg new file mode 100644 index 0000000..2163ff9 Binary files /dev/null and b/gym/static/image/poha.jpeg differ diff --git a/gym/static/image/pullup-4.jpeg b/gym/static/image/pullup-4.jpeg new file mode 100644 index 0000000..b9793fb Binary files /dev/null and b/gym/static/image/pullup-4.jpeg differ diff --git a/gym/static/image/pullup.jpeg b/gym/static/image/pullup.jpeg new file mode 100644 index 0000000..52f75f6 Binary files /dev/null and b/gym/static/image/pullup.jpeg differ diff --git a/gym/static/image/pullup_2.jpeg b/gym/static/image/pullup_2.jpeg new file mode 100644 index 0000000..86c60ab Binary files /dev/null and b/gym/static/image/pullup_2.jpeg differ diff --git a/gym/static/image/roti.jpeg b/gym/static/image/roti.jpeg new file mode 100644 index 0000000..14c071e Binary files /dev/null and b/gym/static/image/roti.jpeg differ diff --git a/gym/static/image/sabji.jpeg b/gym/static/image/sabji.jpeg new file mode 100644 index 0000000..3344f88 Binary files /dev/null and b/gym/static/image/sabji.jpeg differ diff --git a/gym/static/image/salad.jpeg b/gym/static/image/salad.jpeg new file mode 100644 index 0000000..1434eb3 Binary files /dev/null and b/gym/static/image/salad.jpeg differ diff --git a/gym/static/image/shup.jpeg b/gym/static/image/shup.jpeg new file mode 100644 index 0000000..44764ac Binary files /dev/null and b/gym/static/image/shup.jpeg differ diff --git a/gym/static/image/soya.jpeg b/gym/static/image/soya.jpeg new file mode 100644 index 0000000..3d81b91 Binary files /dev/null and b/gym/static/image/soya.jpeg differ diff --git a/gym/static/image/tea.jpeg b/gym/static/image/tea.jpeg new file mode 100644 index 0000000..6e044a5 Binary files /dev/null and b/gym/static/image/tea.jpeg differ diff --git a/gym/static/image/trainer.jpeg b/gym/static/image/trainer.jpeg new file mode 100644 index 0000000..af89502 Binary files /dev/null and b/gym/static/image/trainer.jpeg differ diff --git a/gym/static/image/wotar.jpeg b/gym/static/image/wotar.jpeg new file mode 100644 index 0000000..ecc90bb Binary files /dev/null and b/gym/static/image/wotar.jpeg differ diff --git a/gym/static/src/img/BARBELLS.png b/gym/static/src/img/BARBELLS.png new file mode 100644 index 0000000..111005c Binary files /dev/null and b/gym/static/src/img/BARBELLS.png differ diff --git a/gym/static/src/img/BENCH-PRESS.png b/gym/static/src/img/BENCH-PRESS.png new file mode 100644 index 0000000..74c6875 Binary files /dev/null and b/gym/static/src/img/BENCH-PRESS.png differ diff --git a/gym/static/src/img/CABLES-AND-PULLEYS.png b/gym/static/src/img/CABLES-AND-PULLEYS.png new file mode 100644 index 0000000..e4dda56 Binary files /dev/null and b/gym/static/src/img/CABLES-AND-PULLEYS.png differ diff --git a/gym/static/src/img/CALF-MACHINE.png b/gym/static/src/img/CALF-MACHINE.png new file mode 100644 index 0000000..542d8c0 Binary files /dev/null and b/gym/static/src/img/CALF-MACHINE.png differ diff --git a/gym/static/src/img/DUMBBELLS.png b/gym/static/src/img/DUMBBELLS.png new file mode 100644 index 0000000..470e7a3 Binary files /dev/null and b/gym/static/src/img/DUMBBELLS.png differ diff --git a/gym/static/src/img/HAMMER-STRENGTH-MACHINE.png b/gym/static/src/img/HAMMER-STRENGTH-MACHINE.png new file mode 100644 index 0000000..d3b599d Binary files /dev/null and b/gym/static/src/img/HAMMER-STRENGTH-MACHINE.png differ diff --git a/gym/static/src/img/INCLINE-BENCH-PRESS.png b/gym/static/src/img/INCLINE-BENCH-PRESS.png new file mode 100644 index 0000000..d42bf54 Binary files /dev/null and b/gym/static/src/img/INCLINE-BENCH-PRESS.png differ diff --git a/gym/static/src/img/KETTLEBELLS.png b/gym/static/src/img/KETTLEBELLS.png new file mode 100644 index 0000000..dead2e5 Binary files /dev/null and b/gym/static/src/img/KETTLEBELLS.png differ diff --git a/gym/static/src/img/LAT-PULLDOWN-MACHINE.png b/gym/static/src/img/LAT-PULLDOWN-MACHINE.png new file mode 100644 index 0000000..fb65860 Binary files /dev/null and b/gym/static/src/img/LAT-PULLDOWN-MACHINE.png differ diff --git a/gym/static/src/img/LEG-EXTENSION-MACHINE.png b/gym/static/src/img/LEG-EXTENSION-MACHINE.png new file mode 100644 index 0000000..cdbce6d Binary files /dev/null and b/gym/static/src/img/LEG-EXTENSION-MACHINE.png differ diff --git a/gym/static/src/img/POWER-SQUAT-RACK.png b/gym/static/src/img/POWER-SQUAT-RACK.png new file mode 100644 index 0000000..aefa877 Binary files /dev/null and b/gym/static/src/img/POWER-SQUAT-RACK.png differ diff --git a/gym/static/src/img/PULLUP-BAR.png b/gym/static/src/img/PULLUP-BAR.png new file mode 100644 index 0000000..269e428 Binary files /dev/null and b/gym/static/src/img/PULLUP-BAR.png differ diff --git a/gym/static/src/img/Stability-Ball-Exercise-Ball-Equipment.png b/gym/static/src/img/Stability-Ball-Exercise-Ball-Equipment.png new file mode 100644 index 0000000..14df2c3 Binary files /dev/null and b/gym/static/src/img/Stability-Ball-Exercise-Ball-Equipment.png differ diff --git a/gym/static/src/img/barbells.jpg b/gym/static/src/img/barbells.jpg new file mode 100644 index 0000000..208c677 Binary files /dev/null and b/gym/static/src/img/barbells.jpg differ diff --git a/gym/static/src/img/image.jpeg b/gym/static/src/img/image.jpeg new file mode 100644 index 0000000..7b9b574 Binary files /dev/null and b/gym/static/src/img/image.jpeg differ diff --git a/gym/static/src/img/images.jpeg b/gym/static/src/img/images.jpeg new file mode 100644 index 0000000..3e4cb04 Binary files /dev/null and b/gym/static/src/img/images.jpeg differ diff --git a/gym/static/src/img/images.png b/gym/static/src/img/images.png new file mode 100644 index 0000000..eb7f92b Binary files /dev/null and b/gym/static/src/img/images.png differ diff --git a/gym/static/src/img/images2.jpeg b/gym/static/src/img/images2.jpeg new file mode 100644 index 0000000..aff90f8 Binary files /dev/null and b/gym/static/src/img/images2.jpeg differ diff --git a/gym/static/src/img/images3.jpeg b/gym/static/src/img/images3.jpeg new file mode 100644 index 0000000..2dac7ae Binary files /dev/null and b/gym/static/src/img/images3.jpeg differ diff --git a/gym/static/src/img/imagess.jpeg b/gym/static/src/img/imagess.jpeg new file mode 100644 index 0000000..5d9d39b Binary files /dev/null and b/gym/static/src/img/imagess.jpeg differ diff --git a/gym/static/src/img/imagesss.jpeg b/gym/static/src/img/imagesss.jpeg new file mode 100644 index 0000000..86a56aa Binary files /dev/null and b/gym/static/src/img/imagesss.jpeg differ diff --git a/gym/static/src/img/imagessss.jpeg b/gym/static/src/img/imagessss.jpeg new file mode 100644 index 0000000..9fd9c93 Binary files /dev/null and b/gym/static/src/img/imagessss.jpeg differ diff --git a/gym/static/src/img/index.jpeg b/gym/static/src/img/index.jpeg new file mode 100644 index 0000000..5ba556e Binary files /dev/null and b/gym/static/src/img/index.jpeg differ diff --git a/gym/static/src/img/index1.png b/gym/static/src/img/index1.png new file mode 100644 index 0000000..6adb5d2 Binary files /dev/null and b/gym/static/src/img/index1.png differ diff --git a/gym/static/src/img/new-open.png b/gym/static/src/img/new-open.png new file mode 100644 index 0000000..e229025 Binary files /dev/null and b/gym/static/src/img/new-open.png differ diff --git a/gym/views/company_view.xml b/gym/views/company_view.xml new file mode 100644 index 0000000..50bde6b --- /dev/null +++ b/gym/views/company_view.xml @@ -0,0 +1,26 @@ + + + + + view.company.form.inherit + res.company + + + +
+
+
+
+
+ +
diff --git a/gym/views/gym_skills_view.xml b/gym/views/gym_skills_view.xml new file mode 100644 index 0000000..2bc35b9 --- /dev/null +++ b/gym/views/gym_skills_view.xml @@ -0,0 +1,44 @@ + + + + + view.trainer.skills.form + gym.skills + +
+ + + + + + +
+
+
+ + + + view.trainer.skills.tree + gym.skills + + + + + + + + + + + Trainer Skills + ir.actions.act_window + gym.skills + form + tree,form + + + + + +
diff --git a/gym/views/member_view.xml b/gym/views/member_view.xml new file mode 100644 index 0000000..a08d3b1 --- /dev/null +++ b/gym/views/member_view.xml @@ -0,0 +1,609 @@ + + + + + view.tree.tree.inherit + res.partner + + + + + + + + + + + + + + + + + + + + + + + view.member.form.inherit + res.partner + + + + + + + + + 1 + + + + + + + + + + + 1 + + + 1 + + + 1 + + + 1 + + + 1 + + + + + + + + + 1 + + + + + + +

+ +

+
+ +
+
+
+ + + + +
+ + + + + + + + + + + + +
+
+
+
+
+ + 1 + +
+
+ + + view.task.partner.info.form.inherit + res.partner + + + + Workouts + + + + + + + Measurements + ir.actions.act_window + body.measurement + form + kanban,tree,form + + + + + Member Measurement History + ir.actions.act_window + body.measurement + form + tree,form + [('partner_id', '=', active_id)] + + + + + member.kanban.view.new + res.partner + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ +
+
+ +
+
+ + + + + + + + + + + + Members + ir.actions.act_window + res.partner + form + tree,form + [('is_member','=',True)] + {"member_default":True} + + + + + kanban + + + + + + + + + + + + + view.measurement.history.form + body.measurement + +
+ + + + + + + + + + + + + +
+
+
+ + + + view.measurement.history.tree + body.measurement + + + + + + + + + + + + + + + + + + + + + + + view.measurement.search + body.measurement + + + + + + + + + + + + + + measurement.pivot + body.measurement + + + + + + + + + + + + + + + + + + + + measurement.graph + body.measurement + + + + + + + + + + + + Measurements Analysis + body.measurement + form + pivot,graph + + {'search_default_group_by_member': 1, + 'search_default_group_by_date_day': 1} + + + + + + + + + + + + + + + + diff --git a/gym/views/membership_view.xml b/gym/views/membership_view.xml new file mode 100644 index 0000000..d4d315c --- /dev/null +++ b/gym/views/membership_view.xml @@ -0,0 +1,420 @@ + + + + + view.membership.form.inherit + product.template + + + + 0 + + + 1 + + + 0 + + + 1 + + + + + + + + + view.membership.tree.inherit + product.template + + + + 1 + + + 1 + + + + + + view.partner.form.membership.inherit + res.partner + + + + + + + + +
+ + + + + + +
+ + + + + +
+ + + + + + + +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
+
+
+
+ + + 1 + + + 1 + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + True + + + + True + + + True + + +
+
+ + + + Membership Plans + ir.actions.act_window + product.template + form + tree,form + + [('is_membership','=',True)] + {'membership':True, 'type':'service', + 'default_is_membership': True, 'default_type': 'service'} + + +

+ Click here to add new membership. +

+
+
+ + + tree + + + + + + + + + + + view.membership.plan.form + membership.membership_line + +
+
+ +
+ + +

+ +

+ + + + + + +
+ + + + + +
+
+
+
+ + + + view.membership.plan.tree + membership.membership_line + + + + + + + + + + + + + view.membership.search + membership.membership_line + + + + + + + + + + + view.membership.kanban + membership.membership_line + + + + +
+ +
+ +
+
+
+ + + +
+
+ Start Date - + +
+
+ End Date - + +
+
+
+ +
+
+
+
+
+ + + + + + + + + Membership + ir.actions.act_window + membership.membership_line + form + tree,kanban,form + + + + + Member Membership + ir.actions.act_window + membership.membership_line + form + tree,kanban,form + [('partner', '=', active_id)] + + + + + + diff --git a/gym/views/menuitem_hide.xml b/gym/views/menuitem_hide.xml new file mode 100644 index 0000000..e0b7b88 --- /dev/null +++ b/gym/views/menuitem_hide.xml @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + diff --git a/gym/views/product_template.xml b/gym/views/product_template.xml new file mode 100644 index 0000000..9bc7860 --- /dev/null +++ b/gym/views/product_template.xml @@ -0,0 +1,345 @@ + + + + + + + + + + + view.equipments.form.view + product.template + +
+
+
+ +
+ +
+ +
+
+ + + + + + + + + + + + + + +
+
+
+
+ + + + + view.equipments.tree.view + product.template + + + + + + + + + + + + + + + + view.equipments.kanban.view + product.template + + + + + + + + +
    +
  • Cost:
  • + +
    +
  • Exercise Type:
  • +
    +
    +
  • Company Name:
  • +
    +
    +
  • Purchase Date:
  • +
    +
    +
  • Note:
  • +
    +
    +
  • State:
  • +
    +
    + +
    +
  • Unit Of Measure:
  • +
    +
    +
  • Calories:
  • +
    +
    +
  • Protein:
  • +
    +
    +
  • Carbohydrates:
  • +
    +
    +
  • Fat:
  • +
    +
    +
  • Fibres:
  • +
    +
    +
  • Sodium:
  • +
    +
    +
+
+
+
+ + + + view.equipments.search + product.template + + + + + + + + + + + view.exercise.form + exercise.type + +
+ + + + + +
+
+
+ + + + view.exercise.tree + exercise.type + + + + + + + + + + Body Parts + ir.actions.act_window + exercise.type + form + tree,form + +

+ Click here to add new body part. +

+
+
+ + + + + + view.service.form.inherit + product.template + + + + Service Name + + + + + + view.product.template.form.inherit + product.template + + + +
+ +
+
+
+
+ + + + Service Type + ir.actions.act_window + product.template + form + kanban,tree,form + [('is_service','=',True)] + {'service_default':True} + +

+ Click here to add new service. +

+
+
+ + + + + + + Equipments + ir.actions.act_window + product.template + form + kanban,tree,form + [('is_equipment','=',True)] + + {"equipments_default":True,'search_default_fill_equipment':1} + + +

+ Click here to add new equipment. +

+
+
+ + + + kanban + + + + + + tree + + + + + + form + + + + + + + + + + + +
diff --git a/gym/views/project_task_view.xml b/gym/views/project_task_view.xml new file mode 100644 index 0000000..ef3c3a6 --- /dev/null +++ b/gym/views/project_task_view.xml @@ -0,0 +1,67 @@ + + + + 1 + + + + view.project.task.form.inherited + project.task + + + + + + + + + + + + + + + + + + + view.project.kanban.inherited + project.task + + + +
+ Schedule Date - + +
+
+
+
+ + + + view.project.form.inherited1 + project.project + + + + + + + + + + + + + + + Member Tasks + ir.actions.act_window + project.task + form + kanban,tree,form,calendar,pivot,graph,activity + [('partner_id', '=', active_id)] + + +
diff --git a/gym/views/trainer_view.xml b/gym/views/trainer_view.xml new file mode 100644 index 0000000..69a655d --- /dev/null +++ b/gym/views/trainer_view.xml @@ -0,0 +1,45 @@ + + + + + view.trainer.form.inherit + hr.employee + + + + + + + + + + + {'required':[('is_trainer','=',True)]} + + + + True + + + Trainer's Name + + + + + + + Trainers + ir.actions.act_window + hr.employee + form + kanban,tree,form + [('is_trainer','=',True)] + {"default_is_trainer":True} + + + + + + diff --git a/gym/views/workout_view.xml b/gym/views/workout_view.xml new file mode 100644 index 0000000..adb0634 --- /dev/null +++ b/gym/views/workout_view.xml @@ -0,0 +1,171 @@ + + + + + view.exercise.workout.lines.form + exercise.lines + +
+ + + + + + + + +
+
+
+ + + + view.exercise.workout.lines.tree + exercise.lines + + + + + + + + + + + + + view.exercise.repeat.repeat.form + repeat.repeat + +
+ + + + + + + +
+
+
+ + + + view.exercisess.form + exercise.exercise + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ + + + +
+
+
+
+ +
+
+ + + + view.exercisess.tree + exercise.exercise + + + + + + + + + + + + view.exercisess.search + exercise.exercise + + + + + + + + + + + + Exercises + ir.actions.act_window + exercise.exercise + form + tree,form + +

+ Click here to add new exercise. +

+
+
+ + + + +