12 | A diary is a register of an organization, where incoming, outgoing and prepared documents are
13 | registered. The purpose of diaries in the public sector is to create transparency according to the
14 | principle of openness. Record keeping in Sweden is regulated, among other things, by the Public Access
15 | to Information and Secrecy Act (SFS 2009: 400), which entered into force on 30 June 2009.
16 |
29 | Glabels uses a template for the label design and are using a special
30 | notation, ${name}, for including fields from the database. When you
31 | design your labels use a dummy csv-file for your model you want
32 | to tie the report to and the format "Text: coma separated Values
33 | (CSV) with keys on line 1". When the template is ready you can
34 | upload it to the report-record (or include it in the xml-record if
35 | you are building a module). There is a test report action that
36 | also lists all fields for the choosen model.
37 |
50 | This module needs Glabel to be installed on the server (for Ubuntu:
51 | sudo apt install glabels)
52 |
53 | You can test your template (and installation) using glabels-batch-command:
54 | glabels-3-batch -o <out-file> -l -C -i <csv-file> <your template.glabels>
55 | This command are alike both on workstation and server.
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
--------------------------------------------------------------------------------
/calander_full_form/static/description/inkscape_export_settings.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vertelab/odoo-calendar/ccb8faff00b8a53f4cb423a51d787e45f87914c0/calander_full_form/static/description/inkscape_export_settings.png
--------------------------------------------------------------------------------
/calander_full_form/static/description/notes.txt:
--------------------------------------------------------------------------------
1 | odoo-calendar / calendar_full_form
2 | 2022-08-30
3 |
4 | Be aware of these!
5 | [project]/[module]/static/description/banner.png
6 | [project]/[module]/static/description/icon.png
7 |
8 | Icon: "calendar-check"
9 | Icons may be found at: https://fontawesome.com/v5/cheatsheet
10 |
11 | Odoo banner: 560 x 280
12 | Odoo icon: 140 x 140
13 |
14 | HEX
15 | #930a57
16 |
17 | #8105a7
18 |
19 |
20 | Source: https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Colors/Color_picker_tool
21 |
22 | Guide:
23 | 1. Use Inkscape to create a colored background. (Import)
24 | 2. Odoo icon: 140 x 140, 560 x 280.
25 | 3. Pick icon at fontawesome and paste in a text field.
26 | 4. Save in ordinary / plain svg format.
27 | 5. In Inkscape, choose Generate PNG image and "Export as...".
28 | 6. Write a filename of choice and choose "Export".
29 |
--------------------------------------------------------------------------------
/calander_full_form/views/calendar_view.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | calendar.event.calendar
5 | calendar.event
6 |
7 |
8 |
9 | false
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/calendar_attendee_planning/__init__.py:
--------------------------------------------------------------------------------
1 | from . import models
2 | from . import tests
--------------------------------------------------------------------------------
/calendar_attendee_planning/__manifest__.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 | ##############################################################################
3 | #
4 | # Odoo SA, Open Source Management Solution, third party addon
5 | # Copyright (C) 2022- Vertel AB ().
6 | #
7 | # This program is free software: you can redistribute it and/or modify
8 | # it under the terms of the GNU Affero General Public License as
9 | # published by the Free Software Foundation, either version 3 of the
10 | # License, or (at your option) any later version.
11 | #
12 | # This program is distributed in the hope that it will be useful,
13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | # GNU Affero General Public License for more details.
16 | #
17 | # You should have received a copy of the GNU Affero General Public License
18 | # along with this program. If not, see .
19 | #
20 | ##############################################################################
21 |
22 | {
23 | 'name': 'Calendar: Attendee Planning',
24 | 'version': '14.0.0.0.1',
25 | # Version ledger: 14.0 = Odoo version. 1 = Major. Non regressionable code. 2 = Minor. New features that are regressionable. 3 = Bug fixes
26 | 'summary': 'Adds attendee views to the calendar',
27 | 'category': 'Calendar',
28 | 'description': """
29 | Adds attendee views to the calendar
30 | """,
31 | 'author': 'Vertel AB',
32 | 'website': 'https://vertel.se/apps/odoo-calendar/calendar_attendee_planning',
33 | 'images': ['static/description/banner.png'], # 560x280 px.
34 | 'license': 'AGPL-3',
35 | 'contributor': '',
36 | 'maintainer': 'Vertel AB',
37 | 'repository': 'https://github.com/vertelab/odoo-calendar',
38 | 'depends': ['calendar','web_timeline', 'hr', 'hr_holidays'],
39 | 'data': [
40 | 'views/calendar_view.xml',
41 | ],
42 | 'demo': [
43 | ],
44 | 'installable': True,
45 | 'application': True,
46 | 'auto_install': False,
47 | }
48 |
--------------------------------------------------------------------------------
/calendar_attendee_planning/models/__init__.py:
--------------------------------------------------------------------------------
1 | from . import calendar_attendee, hr_leave, calendar_event, hr_employee
--------------------------------------------------------------------------------
/calendar_attendee_planning/models/calendar_event.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 | from odoo import models, fields, api
3 | import logging
4 | from datetime import date, datetime
5 |
6 | _logger = logging.getLogger(__name__)
7 |
8 | class CalendarEventModify(models.Model):
9 | _inherit = "calendar.event"
10 |
11 | @api.model
12 | def create(self, vals_list):
13 | res = super().create(vals_list)
14 |
15 | my_overlap = self.check_overlapping()
16 | for overlap in my_overlap:
17 | for attendee in overlap.attendee_ids:
18 | attendee.set_state()
19 | return res
20 |
21 | def write(self, vals):
22 | res = None
23 | for event in self:
24 | if 'active' in vals.keys() and vals['active'] == False:
25 | vals['attendee_ids'] = [(5, 0, 0)]
26 |
27 | pre_move_overlap = event.check_overlapping()
28 |
29 | res = super().write(vals)
30 | if res == False:
31 | break
32 |
33 | post_move_overlap = event.check_overlapping()
34 | for attendee in event.attendee_ids:
35 | #if len(new) != 0:
36 | attendee.set_state()
37 |
38 | for attendee in pre_move_overlap.attendee_ids:
39 | attendee.set_state()
40 |
41 | for attendee in post_move_overlap.attendee_ids:
42 | attendee.set_state()
43 |
44 | return res
45 |
46 | def unlink(self):
47 | pre_move_overlap = self.check_overlapping()
48 |
49 | res = super().unlink()
50 |
51 | for overlap in pre_move_overlap:
52 | for attendee in overlap.attendee_ids:
53 | attendee.set_state()
54 |
55 | return res
56 |
57 | def check_overlapping(self):
58 | overlapping_events = self.env['calendar.event']
59 | for event in self:
60 | overlapping_events |= self.search([
61 | '&',
62 | '|',
63 | '&',
64 | ('start','<',event.start),
65 | ('stop','>',event.start),
66 | '|',
67 | '&',
68 | ('start','<',event.stop),
69 | ('stop','>',event.stop),
70 | '|',
71 | '&',
72 | ('start','<=',event.start),
73 | ('stop','>=',event.stop),
74 | '&',
75 | ('start','>=',event.start),
76 | ('stop','<=',event.stop),
77 | # '&',
78 | # #('partner_id', 'in', attendee_partners),
79 | # ('partner_id', '=', event.partner_id.id),
80 | ('id', '!=', event.id),
81 | ])
82 |
83 | return overlapping_events
84 |
--------------------------------------------------------------------------------
/calendar_attendee_planning/models/hr_employee.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 | from odoo import models, fields, api
3 | from datetime import date, datetime
4 | import logging
5 |
6 | _logger = logging.getLogger(__name__)
7 |
8 | class HrEmployeeWriteModify(models.Model):
9 | _inherit = "hr.employee"
10 |
11 | def write(self,vals):
12 | res = super().write(vals)
13 | if 'hr.contract' in self:
14 | if 'resource_calendar_id' in vals:
15 | events = self.env['calendar.attendee'].search([('event_date_start','>=',datetime.now()),('partner_id','=',self.user_partner_id.id)])
16 | for event in events:
17 | overlap = event.check_overlapping()
18 | event.set_state(overlap)
19 |
20 | return res
21 |
--------------------------------------------------------------------------------
/calendar_attendee_planning/models/hr_leave.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 | from odoo import models, fields, api
3 | import logging
4 | import datetime
5 | from datetime import date, datetime
6 |
7 | _logger = logging.getLogger(__name__)
8 |
9 | class HRLeaveWriteModify(models.Model):
10 | _inherit = "hr.leave"
11 |
12 | @api.model
13 | def create(self, vals_list):
14 | res = super().create(vals_list)
15 |
16 | partner_id = res.employee_id.user_partner_id.id
17 | my_overlap = self.check_overlapping()
18 | for overlap in my_overlap:
19 | for attendee in overlap.attendee_ids:
20 | attendee.set_state()
21 |
22 | return res
23 |
24 | def check_overlapping(self):
25 | overlapping_events = self.env['calendar.event'].search([
26 | '&',
27 | '|',
28 | '&',
29 | ('start','<',self.date_from),
30 | ('stop','>',self.date_from),
31 | '|',
32 | '&',
33 | ('start','<',self.date_to),
34 | ('stop','>',self.date_to),
35 | '|',
36 | '&',
37 | ('start','<=',self.date_from),
38 | ('stop','>=',self.date_to),
39 | '&',
40 | ('start','>=',self.date_from),
41 | ('stop','<=',self.date_to),
42 | #('partner_id', 'in', attendee_partners),
43 | ('partner_id', '=', self.employee_id.user_partner_id.id),
44 | ])
45 | return overlapping_events
46 |
47 | def write(self, vals):
48 | #partner_id = self.employee_id.user_partner_id.id
49 | pre_move_overlap = self.check_overlapping()
50 |
51 | res = super().write(vals)
52 |
53 | post_move_overlap = self.check_overlapping()
54 |
55 | for overlap in pre_move_overlap:
56 | for attendee in overlap.attendee_ids:
57 | attendee.set_state()
58 |
59 | for overlap in post_move_overlap:
60 | for attendee in overlap.attendee_ids:
61 | attendee.set_state()
62 |
63 | return res
64 |
65 | def unlink(self):
66 | #partner_id = self.employee_id.user_partner_id.id
67 | pre_move_overlap = self.check_overlapping()
68 |
69 | res = super().unlink()
70 |
71 | for overlap in pre_move_overlap:
72 | for attendee in overlap.attendee_ids:
73 | attendee.set_state()
74 |
75 | return res
76 |
--------------------------------------------------------------------------------
/calendar_attendee_planning/static/description/banner.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vertelab/odoo-calendar/ccb8faff00b8a53f4cb423a51d787e45f87914c0/calendar_attendee_planning/static/description/banner.png
--------------------------------------------------------------------------------
/calendar_attendee_planning/static/description/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vertelab/odoo-calendar/ccb8faff00b8a53f4cb423a51d787e45f87914c0/calendar_attendee_planning/static/description/icon.png
--------------------------------------------------------------------------------
/calendar_attendee_planning/static/description/inkscape_export_settings_20-04.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vertelab/odoo-calendar/ccb8faff00b8a53f4cb423a51d787e45f87914c0/calendar_attendee_planning/static/description/inkscape_export_settings_20-04.png
--------------------------------------------------------------------------------
/calendar_attendee_planning/static/description/inkscape_export_settings_22-04.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vertelab/odoo-calendar/ccb8faff00b8a53f4cb423a51d787e45f87914c0/calendar_attendee_planning/static/description/inkscape_export_settings_22-04.png
--------------------------------------------------------------------------------
/calendar_attendee_planning/static/description/notes.txt:
--------------------------------------------------------------------------------
1 | odoo-calendar / calendar_attendee_planning
2 | 2023-02-15
3 |
4 | Be aware of these!
5 | [project]/[module]/static/description/banner.png
6 | [project]/[module]/static/description/icon.png
7 |
8 | Icon: "calendar-check"
9 | Icons may be found at: https://fontawesome.com/v5/cheatsheet
10 |
11 | Odoo banner: 560 x 280
12 | Odoo icon: 140 x 140
13 |
14 | HEX
15 | #930a57
16 |
17 | #8105a7
18 |
19 |
20 | Source: https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Colors/Color_picker_tool
21 |
22 | Edit image:
23 | Ubuntu = Pinta, https://www.pinta-project.com/howto/installing-pinta
24 | Windows = Paint.net , https://www.getpaint.net/
25 |
26 | Guide:
27 | 1. Use Inkscape to create a colored background. (Import)
28 | 2. Odoo icon: 140 x 140, 560 x 280.
29 | 3. Pick icon at fontawesome and paste in a text field.
30 | 4. Save in ordinary / plain svg format.
31 | 5. In Inkscape, choose Generate PNG image and "Export as...".
32 | 6. Write a filename...
33 | 7. Be careful when selecting the filename! It's easy to select the wrong path!
34 | 8. ...of choice and choose "Export".
35 |
--------------------------------------------------------------------------------
/calendar_attendee_planning/static/description/vertel_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vertelab/odoo-calendar/ccb8faff00b8a53f4cb423a51d787e45f87914c0/calendar_attendee_planning/static/description/vertel_icon.png
--------------------------------------------------------------------------------
/calendar_attendee_planning/tests/__init__.py:
--------------------------------------------------------------------------------
1 | from . import test_state_change
--------------------------------------------------------------------------------
/calendar_attendee_planning/tests/test_state_change.py:
--------------------------------------------------------------------------------
1 | from odoo import fields
2 | from odoo.tests import common
3 | import datetime
4 | import logging
5 |
6 | _logger = logging.getLogger(__name__)
7 |
8 | #test color change, state change when write to attendee, check overlapping, check if person has hr.leave
9 |
10 | class TestAttendeeInteractions(common.SavepointCase):
11 |
12 | @classmethod
13 | def setUpClass(cls):
14 | super().setUpClass()
15 | cls.start = datetime.datetime(2023, 2, 2, 10)
16 | cls.stop = datetime.datetime(2023, 2, 2, 11)
17 | cls.start2 = datetime.datetime(2023, 2, 2, 10, 15)
18 | cls.stop2 = datetime.datetime(2023, 2, 2, 11, 15)
19 | cls.created_event_earlier = cls.env['calendar.event'].create({'name': 'test', 'start': str(cls.start), 'stop': str(cls.stop), 'partner_ids': [[6, False, [3]]],})
20 | cls.created_event_later = cls.env['calendar.event'].create({'name': 'test', 'start': str(cls.start2), 'stop': str(cls.stop), 'partner_ids': [[6, False, [3]]],})
21 |
22 | def test_color_change(self):
23 | self.created_event_later.attendee_ids[0].write({'event_date_start': self.start2, 'event_date_end': self.stop2})
24 | self.assertEqual(self.created_event_later.attendee_ids[0].color, 1)
25 |
--------------------------------------------------------------------------------
/calendar_ics/__init__.py:
--------------------------------------------------------------------------------
1 | from . import models
2 | from . import controllers
3 |
4 |
--------------------------------------------------------------------------------
/calendar_ics/__manifest__.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 | ##############################################################################
3 | #
4 | # OpenERP, Open Source Management Solution, third party addon
5 | # Copyright (C) 2004-2016 Vertel AB ().
6 | #
7 | # This program is free software: you can redistribute it and/or modify
8 | # it under the terms of the GNU Affero General Public License as
9 | # published by the Free Software Foundation, either version 3 of the
10 | # License, or (at your option) any later version.
11 | #
12 | # This program is distributed in the hope that it will be useful,
13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | # GNU Affero General Public License for more details.
16 | #
17 | # You should have received a copy of the GNU Affero General Public License
18 | # along with this program. If not, see .
19 | #
20 | ##############################################################################
21 |
22 | {
23 | 'name': 'Calendar: ICS',
24 | 'version': '14.0.0.1.0',
25 | 'category': 'Calendar',
26 | 'summary': 'Subscription on calendar.ics-urls',
27 | 'images': ['static/description/banner.png'], # 560x280 px.
28 | 'licence': 'AGPL-3',
29 | 'description': """
30 | Adds and updates calendar objects according to an ics-url.
31 | """,
32 | 'author': 'Vertel AB',
33 | 'website': 'https://vertel.se/apps/odoo-calendar/calendar_ics',
34 | 'depends': ['calendar', ],
35 | 'external_dependencies': {
36 | 'python': ['icalendar'],
37 | },
38 | 'data': [
39 | 'views/res_partner_view.xml',
40 | # 'views/calendar_view.xml',
41 | #'security/ir.model.access.csv',
42 | 'data/res_partner_data.xml'
43 | ],
44 | 'application': False,
45 | 'installable': True,
46 | 'demo': ['demo/calendar_ics_demo.xml', ],
47 | }
48 | # vim:expandtab:smartindent:tabstop=4s:softtabstop=4:shiftwidth=4:
49 |
--------------------------------------------------------------------------------
/calendar_ics/controllers/__init__.py:
--------------------------------------------------------------------------------
1 | from . import main
2 |
--------------------------------------------------------------------------------
/calendar_ics/controllers/main.py:
--------------------------------------------------------------------------------
1 | from odoo import http
2 | from odoo.http import request
3 | from urllib.request import urlopen
4 | import urllib
5 |
6 |
7 | class res_partner_icalendar(http.Controller):
8 |
9 | #~ @http.route(['/partner//calendar/private.ics'], type='http', auth="public", website=True)
10 | #~ def icalendar_private(self, partner=False, **post):
11 | #~ if partner:
12 | #~ document = partner.sudo().get_ics_calendar(type='private').to_ical()
13 | #~ return request.make_response(
14 | #~ headers=[('WWW-Authenticate', 'Basic realm="MaxRealm"')]
15 | #~ )
16 | #~ else:
17 | #~ raise Warning("Private failed")
18 | #~ pass # Some error page
19 |
20 | @http.route(['/partner//calendar/freebusy.ics'], type='http', auth="public", website=True)
21 | def icalendar_freebusy(self, partner=False, **post):
22 | if partner:
23 | document = partner.sudo().get_ics_calendar(event_type='freebusy').to_ical()
24 | return request.make_response(
25 | document,
26 | headers=[
27 | ('Content-Disposition', 'attachment; filename="freebusy.ifb"'),
28 | ('Content-Type', 'text/calendar'),
29 | ('Content-Length', len(document)),
30 | ]
31 | )
32 | else:
33 | raise Warning()
34 |
35 | @http.route(['/partner//calendar/public.ics'], type='http', auth="public", website=True)
36 | def icalendar_public(self, partner=None, **post):
37 | if partner:
38 | document = request.env['res.partner'].sudo().browse(partner).get_ics_calendar(event_type='public')
39 | return request.make_response(
40 | document,
41 | headers=[
42 | ('Content-Disposition', 'attachment; filename="public.ics"'),
43 | ('Content-Type', 'text/calendar'),
44 | ('Content-Length', len(document)),
45 | ]
46 | )
47 | else:
48 | raise Warning("Public failed")
49 |
--------------------------------------------------------------------------------
/calendar_ics/data/res_partner_data.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 |
7 | ics_url
8 | admin@example.com
9 |
10 | Calendar ics url
11 | ${(object.email or '')|safe}
12 |
13 |
14 | Use this url for the ${object.name} calendar:
26 | Glabels uses a template for the label design and are using a special
27 | notation, ${name}, for including fields from the database. When you
28 | design your labels use a dummy csv-file for your model you want
29 | to tie the report to and the format "Text: coma separated Values
30 | (CSV) with keys on line 1". When the template is ready you can
31 | upload it to the report-record (or include it in the xml-record if
32 | you are building a module). There is a test report action that
33 | also lists all fields for the choosen model.
34 |
47 | This module needs Glabel to be installed on the server (for Ubuntu:
48 | sudo apt install glabels)
49 |
50 | You can test your template (and installation) using glabels-batch-command:
51 | glabels-3-batch -o <out-file> -l -C -i <csv-file> <your template.glabels>
52 | This command are alike both on workstation and server.
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
--------------------------------------------------------------------------------
/calendar_ics/static/description/inkscape_export_settings.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vertelab/odoo-calendar/ccb8faff00b8a53f4cb423a51d787e45f87914c0/calendar_ics/static/description/inkscape_export_settings.png
--------------------------------------------------------------------------------
/calendar_ics/static/description/notes.txt:
--------------------------------------------------------------------------------
1 | odoo-calendar / calendar_ics
2 | 2022-08-30
3 |
4 | Be aware of these!
5 | [project]/[module]/static/description/banner.png
6 | [project]/[module]/static/description/icon.png
7 |
8 | Icon: "calendar-check"
9 | Icons may be found at: https://fontawesome.com/v5/cheatsheet
10 |
11 | Odoo banner: 560 x 280
12 | Odoo icon: 140 x 140
13 |
14 | HEX
15 | #930a57
16 |
17 | #8105a7
18 |
19 |
20 | Source: https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Colors/Color_picker_tool
21 |
22 | Guide:
23 | 1. Use Inkscape to create a colored background. (Import)
24 | 2. Odoo icon: 140 x 140, 560 x 280.
25 | 3. Pick icon at fontawesome and paste in a text field.
26 | 4. Save in ordinary / plain svg format.
27 | 5. In Inkscape, choose Generate PNG image and "Export as...".
28 | 6. Write a filename of choice and choose "Export".
29 |
--------------------------------------------------------------------------------
/calendar_ics/views/res_partner_view.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | res.partner.ics
6 | res.partner
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/calendar_resource_booking/__init__.py:
--------------------------------------------------------------------------------
1 | from . import models
2 |
--------------------------------------------------------------------------------
/calendar_resource_booking/__manifest__.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 | ##############################################################################
3 | #
4 | # Odoo SA, Open Source Management Solution, third party addon
5 | # Copyright (C) 2022- Vertel AB ().
6 | #
7 | # This program is free software: you can redistribute it and/or modify
8 | # it under the terms of the GNU Affero General Public License as
9 | # published by the Free Software Foundation, either version 3 of the
10 | # License, or (at your option) any later version.
11 | #
12 | # This program is distributed in the hope that it will be useful,
13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | # GNU Affero General Public License for more details.
16 | #
17 | # You should have received a copy of the GNU Affero General Public License
18 | # along with this program. If not, see .
19 | #
20 | ##############################################################################
21 |
22 | {
23 | 'name': 'Calendar Resource Booking',
24 | 'version': '14.0.0.0.1',
25 | # Version ledger: 14.0 = Odoo version. 1 = Major. Non regressionable code. 2 = Minor. New features that are regressionable. 3 = Bug fixes
26 | 'summary': 'Adds material resource to book at an appointment',
27 | 'category': 'Calendar',
28 | 'description': """
29 | Adds resource tags to a calendar event
30 | """,
31 | 'author': 'Vertel AB',
32 | 'website': 'https://vertel.se/apps/odoo-calendar/calendar_resource_booking',
33 | 'images': [], # 560x280 px.
34 | 'license': 'AGPL-3',
35 | 'contributor': '',
36 | 'maintainer': 'Vertel AB',
37 | 'repository': 'https://github.com/vertelab/odoo-calendar',
38 | 'depends': ['calendar','resource'],
39 | 'data': [
40 | 'views/calendar_view.xml',
41 | ],
42 | 'demo': [
43 | ],
44 | 'installable': True,
45 | 'application': True,
46 | 'auto_install': False,
47 | }
48 |
--------------------------------------------------------------------------------
/calendar_resource_booking/models/__init__.py:
--------------------------------------------------------------------------------
1 | from . import calendar_event
2 |
--------------------------------------------------------------------------------
/calendar_resource_booking/models/calendar_event.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 | from odoo import models, fields, api
3 | import logging
4 | from datetime import date, datetime
5 |
6 | _logger = logging.getLogger(__name__)
7 |
8 | class CalendarEventModify(models.Model):
9 | _inherit = "calendar.event"
10 |
11 | resource_ids = fields.Many2many(comodel_name='resource.resource',string='Resource',domain="[('resource_type','=','material')]") # relation|column1|column2
12 | resource_status = fields.Char(readonly=True)
13 | resource_status = fields.Char(readonly=True,compute='onchange_resource')
14 |
15 |
16 | @api.depends("resource_ids")
17 | def onchange_resource(self):
18 |
19 | def overlap(self, other):
20 | if other.start < self.start < other.stop:
21 | return False
22 | elif other.start < self.stop < other.stop:
23 | return False
24 | elif self.start < other.start < self.stop:
25 | return False
26 | elif self.start < other.stop < self.stop:
27 | return False
28 | return True
29 |
30 | calendars = self.env['calendar.event'].search(
31 | [
32 | ('stop_date','<=',self.start_date),
33 | ('start_date','>=',self.start_date),
34 |
35 | ]
36 | )
37 | _logger.warning(calendars)
38 | self.resource_status=''
39 | for c in calendars:
40 | if overlap(self,c):
41 | for r in self.resource_ids:
42 | if c.create_date < self.create_date:
43 | self.resource_status = _('%s are already booked by %s') % (r.name,c.name)
44 | else:
45 | self.resource_status = _('%s tries to book %s') % (c.name,r.name)
46 |
47 |
--------------------------------------------------------------------------------
/calendar_resource_booking/views/calendar_view.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | resource.booking
8 | calendar.event
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/calendar_skills_allergies_glue/__init__.py:
--------------------------------------------------------------------------------
1 | from . import models
--------------------------------------------------------------------------------
/calendar_skills_allergies_glue/__manifest__.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 | ##############################################################################
3 | #
4 | # Odoo SA, Open Source Management Solution, third party addon
5 | # Copyright (C) 2023- Vertel AB ().
6 | #
7 | # This program is free software: you can redistribute it and/or modify
8 | # it under the terms of the GNU Affero General Public License as
9 | # published by the Free Software Foundation, either version 3 of the
10 | # License, or (at your option) any later version.
11 | #
12 | # This program is distributed in the hope that it will be useful,
13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | # GNU Affero General Public License for more details.
16 | #
17 | # You should have received a copy of the GNU Affero General Public License
18 | # along with this program. If not, see .
19 | #
20 | ##############################################################################
21 |
22 | {
23 | 'name': 'Calendar: Skills and allergies glue module',
24 | 'version': '14.0.0.1.0',
25 | # Version ledger: 14.0 = Odoo version. 1 = Major. Non regressionable code. 2 = Minor. New features that are regressionable. 3 = Bug fixes
26 | 'summary': 'Compare contract and partner skills & allergies.',
27 | # Categories can be used to filter modules in modules listing
28 | # Check https://github.com/odoo/odoo/blob/14.0/odoo/addons/base/data/ir_module_category_data.xml
29 | # for the full list
30 | 'category': 'Calendar',
31 | 'description': """
32 | Adds a check if sklls and allergies match for a calendar.attendee.
33 | """,
34 | #'sequence': '1',
35 | 'author': 'Vertel AB',
36 | 'website': 'https://vertel.se/apps/odoo-calendar/calendar_skills_allergies_glue',
37 | 'images': ['static/description/banner.png'], # 560x280 px.
38 | 'license': 'AGPL-3',
39 | 'contributor': '',
40 | 'maintainer': 'Vertel AB',
41 | 'repository': 'https://github.com/vertelab/odoo-calendar',
42 | # Any module necessary for this one to work correctly
43 |
44 | 'depends': ['calendar_attendee_planning', 'contract_attendee', 'contract_allergic', 'contract_cleaner', 'contract'],
45 | 'data': [
46 | 'views/calendar_view.xml',
47 | ],
48 | 'auto_install': True,
49 | }
50 | # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
51 |
--------------------------------------------------------------------------------
/calendar_skills_allergies_glue/models/__init__.py:
--------------------------------------------------------------------------------
1 | from . import calendar_attendee, contract_contract
--------------------------------------------------------------------------------
/calendar_skills_allergies_glue/models/calendar_attendee.py:
--------------------------------------------------------------------------------
1 | from odoo import models, fields, api
2 | import logging
3 | import datetime
4 | from datetime import date, datetime
5 |
6 | _logger = logging.getLogger(__name__)
7 |
8 | class CalendarAttendee(models.Model):
9 | _inherit = "calendar.attendee"
10 |
11 | contract_skill_ids = fields.Many2many(related='contract_id.skill_ids', readonly=False)
12 | contract_allergy_ids = fields.Many2many(related='contract_id.allergy_ids', readonly=False)
13 | partner_skill_ids = fields.Many2many(related='partner_id.skill_ids', readonly=False)
14 | partner_allergy_ids = fields.Many2many(related='partner_id.allergy_ids', readonly=False)
15 |
16 | # @api.depends('partner_id')
17 | # def check_skills_allergies_match(self):
18 | # _logger.warning(f"HELLO {self.contract_skill_ids.ids}")
19 |
20 | def write(self, vals):
21 | res = super().write(vals)
22 | if vals.get('partner_id',):
23 | # _logger.warning(self.contract_skill_ids.ids)
24 | # _logger.warning(self.partner_skill_ids.ids)
25 | # contract_skill_id_list = [x for x in self.contract_skill_ids.ids].sort()
26 | # partner_skill_id_list = [x for x in self.partner_skill_ids.ids].sort()
27 | # _logger.warning(contract_skill_id_list)
28 | # _logger.warning(partner_skill_id_list)
29 |
30 | if not all(skill in self.partner_skill_ids.ids for skill in self.contract_skill_ids.ids):
31 | self.state = 'declined'
32 |
33 |
--------------------------------------------------------------------------------
/calendar_skills_allergies_glue/models/contract_contract.py:
--------------------------------------------------------------------------------
1 | import datetime
2 | import logging
3 |
4 | from odoo import models, fields, api, _
5 | from datetime import datetime, timedelta
6 |
7 | _logger = logging.getLogger(__name__)
8 |
9 | class ContractSkillAllergy(models.Model):
10 | _inherit = "contract.contract"
11 |
12 | skill_ids = fields.Many2many('res.skill', string='Skills')
13 | allergy_ids = fields.Many2many('res.allergy', string='Allergies')
14 |
--------------------------------------------------------------------------------
/calendar_skills_allergies_glue/static/description/banner.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vertelab/odoo-calendar/ccb8faff00b8a53f4cb423a51d787e45f87914c0/calendar_skills_allergies_glue/static/description/banner.png
--------------------------------------------------------------------------------
/calendar_skills_allergies_glue/static/description/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vertelab/odoo-calendar/ccb8faff00b8a53f4cb423a51d787e45f87914c0/calendar_skills_allergies_glue/static/description/icon.png
--------------------------------------------------------------------------------
/calendar_skills_allergies_glue/static/description/inkscape_export_settings_20-04.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vertelab/odoo-calendar/ccb8faff00b8a53f4cb423a51d787e45f87914c0/calendar_skills_allergies_glue/static/description/inkscape_export_settings_20-04.png
--------------------------------------------------------------------------------
/calendar_skills_allergies_glue/static/description/inkscape_export_settings_22-04.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vertelab/odoo-calendar/ccb8faff00b8a53f4cb423a51d787e45f87914c0/calendar_skills_allergies_glue/static/description/inkscape_export_settings_22-04.png
--------------------------------------------------------------------------------
/calendar_skills_allergies_glue/static/description/notes.txt:
--------------------------------------------------------------------------------
1 | odoo-calendar / calendar_skills_allergies_glue
2 | 2023-02-15
3 |
4 | Be aware of these!
5 | [project]/[module]/static/description/banner.png
6 | [project]/[module]/static/description/icon.png
7 |
8 | Icon: "calendar-check"
9 | Icons may be found at: https://fontawesome.com/v5/cheatsheet
10 |
11 | Odoo banner: 560 x 280
12 | Odoo icon: 140 x 140
13 |
14 | HEX
15 | #930a57
16 |
17 | #8105a7
18 |
19 |
20 | Source: https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Colors/Color_picker_tool
21 |
22 | Edit image:
23 | Ubuntu = Pinta, https://www.pinta-project.com/howto/installing-pinta
24 | Windows = Paint.net , https://www.getpaint.net/
25 |
26 | Guide:
27 | 1. Use Inkscape to create a colored background. (Import)
28 | 2. Odoo icon: 140 x 140, 560 x 280.
29 | 3. Pick icon at fontawesome and paste in a text field.
30 | 4. Save in ordinary / plain svg format.
31 | 5. In Inkscape, choose Generate PNG image and "Export as...".
32 | 6. Write a filename...
33 | 7. Be careful when selecting the filename! It's easy to select the wrong path!
34 | 8. ...of choice and choose "Export".
35 |
--------------------------------------------------------------------------------
/calendar_skills_allergies_glue/views/calendar_view.xml:
--------------------------------------------------------------------------------
1 |
2 |
13 |
14 |
15 |
16 | contract_add_skills_allergies_view
17 | contract.contract
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 | add_contract_skill_and_allergies
29 | calendar.attendee
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
--------------------------------------------------------------------------------
/calendar_sync/__init__.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 |
3 | from . import controllers
4 |
--------------------------------------------------------------------------------
/calendar_sync/__manifest__.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 | ##############################################################################
3 | #
4 | # Odoo SA, Open Source Management Solution, third party addon
5 | # Copyright (C) 2022- Vertel AB ().
6 | #
7 | # This program is free software: you can redistribute it and/or modify
8 | # it under the terms of the GNU Affero General Public License as
9 | # published by the Free Software Foundation, either version 3 of the
10 | # License, or (at your option) any later version.
11 | #
12 | # This program is distributed in the hope that it will be useful,
13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | # GNU Affero General Public License for more details.
16 | #
17 | # You should have received a copy of the GNU Affero General Public License
18 | # along with this program. If not, see .
19 | #
20 | ##############################################################################
21 |
22 | {
23 | 'name': 'Calendar: Sync',
24 | 'version': '14.0.0.0.1',
25 | # Version ledger: 14.0 = Odoo version. 1 = Major. Non regressionable code. 2 = Minor. New features that are regressionable. 3 = Bug fixes
26 | 'summary': 'Syncs the Odoo calendar with other apps.',
27 | 'category': 'Calendar',
28 | 'description': """
29 | Sets up a REST API that enables Odoo to sync calendar events with other apps.
30 | """,
31 | #'sequence': '1',
32 | 'author': 'Vertel AB',
33 | 'website': 'https://vertel.se/apps/odoo-calendar/calendar_sync',
34 | 'images': ['static/description/banner.png'], # 560x280 px.
35 | 'license': 'AGPL-3',
36 | 'contributor': '',
37 | 'maintainer': 'Vertel AB',
38 | 'repository': 'https://github.com/vertelab/odoo-calendar',
39 | 'depends': ['calendar'],
40 | 'data': [],
41 | 'application': True,
42 | 'installable': True,
43 | }
44 |
45 | # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
46 |
--------------------------------------------------------------------------------
/calendar_sync/controllers/__init__.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 |
3 | from . import controllers
--------------------------------------------------------------------------------
/calendar_sync/controllers/controllers.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 | from odoo import http
3 | import logging
4 |
5 | _logger = logging.getLogger(__name__)
6 |
7 | class CalendarSync(http.Controller):
8 | @http.route('/calendar_sync/', auth='public')
9 | def index(self, **kw):
10 | _logger.error(f'{self=}')
11 | _logger.error(f'{kw=}')
12 | return "Hello, world"
13 | # return http.request.render("calendar_sync.index", {
14 | # 'test': "Hello, world",
15 | # })
16 |
17 | # @http.route('/sync_calendar/sync_calendar/objects/', auth='public')
18 | # def list(self, **kw):
19 | # return http.request.render('sync_calendar.listing', {
20 | # 'root': '/sync_calendar/sync_calendar',
21 | # 'objects': http.request.env['sync_calendar.sync_calendar'].search([]),
22 | # })
23 |
24 | # @http.route('/sync_calendar/sync_calendar/objects//', auth='public')
25 | # def object(self, obj, **kw):
26 | # return http.request.render('sync_calendar.object', {
27 | # 'object': obj
28 | # })
29 |
--------------------------------------------------------------------------------
/calendar_sync/static/description/banner.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vertelab/odoo-calendar/ccb8faff00b8a53f4cb423a51d787e45f87914c0/calendar_sync/static/description/banner.png
--------------------------------------------------------------------------------
/calendar_sync/static/description/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vertelab/odoo-calendar/ccb8faff00b8a53f4cb423a51d787e45f87914c0/calendar_sync/static/description/icon.png
--------------------------------------------------------------------------------
/calendar_sync/static/description/index.html:
--------------------------------------------------------------------------------
1 |
2 |
26 | Glabels uses a template for the label design and are using a special
27 | notation, ${name}, for including fields from the database. When you
28 | design your labels use a dummy csv-file for your model you want
29 | to tie the report to and the format "Text: coma separated Values
30 | (CSV) with keys on line 1". When the template is ready you can
31 | upload it to the report-record (or include it in the xml-record if
32 | you are building a module). There is a test report action that
33 | also lists all fields for the choosen model.
34 |
47 | This module needs Glabel to be installed on the server (for Ubuntu:
48 | sudo apt install glabels)
49 |
50 | You can test your template (and installation) using glabels-batch-command:
51 | glabels-3-batch -o <out-file> -l -C -i <csv-file> <your template.glabels>
52 | This command are alike both on workstation and server.
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
--------------------------------------------------------------------------------
/calendar_sync/static/description/inkscape_export_settings.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vertelab/odoo-calendar/ccb8faff00b8a53f4cb423a51d787e45f87914c0/calendar_sync/static/description/inkscape_export_settings.png
--------------------------------------------------------------------------------
/calendar_sync/static/description/notes.txt:
--------------------------------------------------------------------------------
1 | odoo-calendar / calendar_sync
2 | 2022-08-30
3 |
4 | Be aware of these!
5 | [project]/[module]/static/description/banner.png
6 | [project]/[module]/static/description/icon.png
7 |
8 | Icon: "calendar-check"
9 | Icons may be found at: https://fontawesome.com/v5/cheatsheet
10 |
11 | Odoo banner: 560 x 280
12 | Odoo icon: 140 x 140
13 |
14 | HEX
15 | #930a57
16 |
17 | #8105a7
18 |
19 |
20 | Source: https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Colors/Color_picker_tool
21 |
22 | Guide:
23 | 1. Use Inkscape to create a colored background. (Import)
24 | 2. Odoo icon: 140 x 140, 560 x 280.
25 | 3. Pick icon at fontawesome and paste in a text field.
26 | 4. Save in ordinary / plain svg format.
27 | 5. In Inkscape, choose Generate PNG image and "Export as...".
28 | 6. Write a filename of choice and choose "Export".
29 |
--------------------------------------------------------------------------------
/extended_calendar_notifications/README.rst:
--------------------------------------------------------------------------------
1 | Changelog
2 | =========
3 |
4 | Credits
5 | =======
6 | Authors
7 | ~~~~~~~
8 | * Vertel AB
9 | Contributors
10 | ~~~~~~~~~~~~
11 | *
12 | Maintainers
13 | ~~~~~~~~~~~
14 | This module is maintained by the Vertel AB.
15 |
16 | You can find this moudle at: .
17 | This moudle is maintained at: .
18 |
--------------------------------------------------------------------------------
/extended_calendar_notifications/__init__.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 |
3 | from . import models
--------------------------------------------------------------------------------
/extended_calendar_notifications/__manifest__.py:
--------------------------------------------------------------------------------
1 |
2 | # -*- coding: utf-8 -*-
3 | ##############################################################################
4 | #
5 | # Odoo SA, Open Source Management Solution, third party addon
6 | # Copyright (C) 2022- Vertel AB ().
7 | #
8 | # This program is free software: you can redistribute it and/or modify
9 | # it under the terms of the GNU Affero General Public License as
10 | # published by the Free Software Foundation, either version 3 of the
11 | # License, or (at your option) any later version.
12 | #
13 | # This program is distributed in the hope that it will be useful,
14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | # GNU Affero General Public License for more details.
17 | #
18 | # You should have received a copy of the GNU Affero General Public License
19 | # along with this program. If not, see .
20 | #
21 | ##############################################################################
22 | #
23 | # https://www.odoo.com/documentation/14.0/reference/module.html
24 | #
25 |
26 | {
27 | 'name': 'Calendar: Extended Notifications',
28 | 'version': '14.0.0.0.1',
29 | # Version ledger: 14.0 = Odoo version. 1 = Major. Non regressionable code. 2 = Minor. New features that are regressionable. 3 = Bug fixes
30 | 'summary': 'Module extends functionality for calandar events.',
31 | 'category': 'Calendar',
32 | 'description': """
33 | Module extends functionality for calandar events to send update emails when the event is deleted or changed.
34 | """,
35 | #'sequence': '1',
36 | 'author': 'Vertel AB',
37 | 'website': 'https://vertel.se/apps/odoo-calendar/extended_calendar_notifications',
38 | 'images': ['static/description/banner.png'], # 560x280 px.
39 | 'license': 'AGPL-3',
40 | 'contributor': '',
41 | 'maintainer': 'Vertel AB',
42 | 'repository': 'https://github.com/vertelab/odoo-calendar',
43 | 'depends': ['mail', 'base', 'calendar'],
44 | #"external_dependencies": {
45 | # "bin": ["openssl",],
46 | # "python": ["acme_tiny", "IPy",],
47 | #},
48 | 'data': [
49 | 'data/mail_template.xml'
50 | ],
51 | 'demo': [],
52 | 'application': False,
53 | 'installable': True,
54 | 'auto_install': False,
55 | #"post_init_hook": "post_init_hook",
56 | }
57 | # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
58 |
--------------------------------------------------------------------------------
/extended_calendar_notifications/data/mail_template.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Calendar Event Cancellation Notification
5 | ${(object.event_id.user_id.email_formatted or user.email_formatted or '') | safe}
6 | ${(object.partner_id.email_formatted or user.email_formatted or '') | safe}
7 | Cancelled Event Notification
8 |
9 |
10 |
12 | % set colors = ctx.get('colors', {})
13 | % set recurrent = object.recurrence_id and not ctx['ignore_recurrence']
14 |
15 | Hello ${object.common_name},
16 | The meeting ${object.event_id.name} created by ${object.event_id.user_id.partner_id.name if object.event_id.user_id.partner_id.name != object.common_name else 'you' } has been canceled.
17 |
18 | % if not recurrent:
19 | % endif
20 |
21 |
22 |
23 |
24 |
25 | ${object.event_id.get_interval('dayname', tz=object.partner_id.tz if not object.event_id.allday else None)}
26 |
27 |
28 | ${object.event_id.get_interval('day', tz=object.partner_id.tz if not object.event_id.allday else None)}
29 |
30 |
31 | ${object.event_id.get_interval('month', tz=object.partner_id.tz if not object.event_id.allday else None)}
32 |
33 |
34 | ${not object.event_id.allday and object.event_id.get_interval('time', tz=object.partner_id.tz) or ''}
35 |
36 |
37 |
38 |
39 |
40 |
41 | Thank you
42 | % if object.event_id.user_id.signature:
43 |
44 | ${object.event_id.user_id.signature | safe}
45 | % endif
46 |
47 | ]]>
48 |
49 |
50 |
51 |
--------------------------------------------------------------------------------
/extended_calendar_notifications/models/__init__.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 |
3 | from . import models
--------------------------------------------------------------------------------
/extended_calendar_notifications/models/models.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 |
3 | from re import template
4 | from odoo import models, fields, api
5 |
6 |
7 | class Meeting(models.Model):
8 | _description = 'Extended Calendar Event Notifications'
9 | _inherit = "calendar.event"
10 |
11 | def unlink(self):
12 | # Get concerned attendees to notify them if there is an alarm on the unlinked events,
13 | # as it might have changed their next event notification
14 | events = self.filtered_domain([('alarm_ids', '!=', False)])
15 | partner_ids = events.mapped('partner_ids').ids
16 |
17 | template = self.env.ref('extended_calendar_notifications.calendar_event_cancelled')
18 | for attendee in self.attendee_ids:
19 | template.send_mail(attendee.id, notif_layout='mail.mail_notification_light', force_send=True)
20 |
21 | result = super().unlink()
22 |
23 | # Notify the concerned attendees (must be done after removing the events)
24 | self.env['calendar.alarm_manager']._notify_next_alarm(partner_ids)
25 |
26 | return result
27 |
28 | # name = fields.Char()
29 | # value = fields.Integer()
30 | # value2 = fields.Float(compute="_value_pc", store=True)
31 | # description = fields.Text()
32 | #
33 | # @api.depends('value')
34 | # def _value_pc(self):
35 | # for record in self:
36 | # record.value2 = float(record.value) / 100
37 |
--------------------------------------------------------------------------------
/extended_calendar_notifications/security/ir.model.access.csv:
--------------------------------------------------------------------------------
1 | id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
2 | access_scaffold_test_scaffold_test,scaffold_test.scaffold_test,model_scaffold_test_scaffold_test,base.group_user,1,1,1,1
--------------------------------------------------------------------------------
/extended_calendar_notifications/static/description/banner.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vertelab/odoo-calendar/ccb8faff00b8a53f4cb423a51d787e45f87914c0/extended_calendar_notifications/static/description/banner.png
--------------------------------------------------------------------------------
/extended_calendar_notifications/static/description/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vertelab/odoo-calendar/ccb8faff00b8a53f4cb423a51d787e45f87914c0/extended_calendar_notifications/static/description/icon.png
--------------------------------------------------------------------------------
/extended_calendar_notifications/static/description/index.html:
--------------------------------------------------------------------------------
1 |
2 |
26 | Glabels uses a template for the label design and are using a special
27 | notation, ${name}, for including fields from the database. When you
28 | design your labels use a dummy csv-file for your model you want
29 | to tie the report to and the format "Text: coma separated Values
30 | (CSV) with keys on line 1". When the template is ready you can
31 | upload it to the report-record (or include it in the xml-record if
32 | you are building a module). There is a test report action that
33 | also lists all fields for the choosen model.
34 |
47 | This module needs Glabel to be installed on the server (for Ubuntu:
48 | sudo apt install glabels)
49 |
50 | You can test your template (and installation) using glabels-batch-command:
51 | glabels-3-batch -o <out-file> -l -C -i <csv-file> <your template.glabels>
52 | This command are alike both on workstation and server.
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
--------------------------------------------------------------------------------
/extended_calendar_notifications/static/description/inkscape_export_settings.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vertelab/odoo-calendar/ccb8faff00b8a53f4cb423a51d787e45f87914c0/extended_calendar_notifications/static/description/inkscape_export_settings.png
--------------------------------------------------------------------------------
/extended_calendar_notifications/static/description/notes.txt:
--------------------------------------------------------------------------------
1 | odoo-calendar / extended_calendar_notifications
2 | 2022-08-30
3 |
4 | Be aware of these!
5 | [project]/[module]/static/description/banner.png
6 | [project]/[module]/static/description/icon.png
7 |
8 | Icon: "calendar-check"
9 | Icons may be found at: https://fontawesome.com/v5/cheatsheet
10 |
11 | Odoo banner: 560 x 280
12 | Odoo icon: 140 x 140
13 |
14 | HEX
15 | #930a57
16 |
17 | #8105a7
18 |
19 |
20 | Source: https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Colors/Color_picker_tool
21 |
22 | Guide:
23 | 1. Use Inkscape to create a colored background. (Import)
24 | 2. Odoo icon: 140 x 140, 560 x 280.
25 | 3. Pick icon at fontawesome and paste in a text field.
26 | 4. Save in ordinary / plain svg format.
27 | 5. In Inkscape, choose Generate PNG image and "Export as...".
28 | 6. Write a filename of choice and choose "Export".
29 |
--------------------------------------------------------------------------------
/extended_calendar_notifications/static/src/images/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vertelab/odoo-calendar/ccb8faff00b8a53f4cb423a51d787e45f87914c0/extended_calendar_notifications/static/src/images/icon.png
--------------------------------------------------------------------------------
/extended_calendar_notifications/static/src/readme.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vertelab/odoo-calendar/ccb8faff00b8a53f4cb423a51d787e45f87914c0/extended_calendar_notifications/static/src/readme.txt
--------------------------------------------------------------------------------
/extended_calendar_notifications/static/xx_description/assets/icons/readme.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vertelab/odoo-calendar/ccb8faff00b8a53f4cb423a51d787e45f87914c0/extended_calendar_notifications/static/xx_description/assets/icons/readme.txt
--------------------------------------------------------------------------------
/extended_calendar_notifications/static/xx_description/assets/modules/readme.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vertelab/odoo-calendar/ccb8faff00b8a53f4cb423a51d787e45f87914c0/extended_calendar_notifications/static/xx_description/assets/modules/readme.txt
--------------------------------------------------------------------------------
/extended_calendar_notifications/static/xx_description/assets/readme.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vertelab/odoo-calendar/ccb8faff00b8a53f4cb423a51d787e45f87914c0/extended_calendar_notifications/static/xx_description/assets/readme.txt
--------------------------------------------------------------------------------
/extended_calendar_notifications/static/xx_description/assets/screenshots/readme.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vertelab/odoo-calendar/ccb8faff00b8a53f4cb423a51d787e45f87914c0/extended_calendar_notifications/static/xx_description/assets/screenshots/readme.txt
--------------------------------------------------------------------------------
/extended_calendar_notifications/static/xx_description/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Scaffold Module
7 |
8 |
9 |
Scaffold Module Title
10 |
11 |
--------------------------------------------------------------------------------
/ics_import_holidays/__init__.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 | from . import models
--------------------------------------------------------------------------------
/ics_import_holidays/__manifest__.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 | ##############################################################################
3 | #
4 | # Odoo SA, Open Source Management Solution, third party addon
5 | # Copyright (C) 2022- Vertel AB ().
6 | #
7 | # This program is free software: you can redistribute it and/or modify
8 | # it under the terms of the GNU Affero General Public License as
9 | # published by the Free Software Foundation, either version 3 of the
10 | # License, or (at your option) any later version.
11 | #
12 | # This program is distributed in the hope that it will be useful,
13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | # GNU Affero General Public License for more details.
16 | #
17 | # You should have received a copy of the GNU Affero General Public License
18 | # along with this program. If not, see .
19 | #
20 | ##############################################################################
21 |
22 | {
23 | 'name': 'Calendar: Import holidays',
24 | 'version': '14.0.0.0.1',
25 | # Version ledger: 14.0 = Odoo version. 1 = Major. Non regressionable code. 2 = Minor. New features that are regressionable. 3 = Bug fixes
26 | 'summary': 'Import holidays will update monthly basis so you are always on the right ',
27 | 'category': 'Calendar',
28 | 'description': """
29 | This is a module you can use to import holidays into the calendar and the resource calendar.
30 | Currently it only allows for one URL containing an .ics file to be imported.
31 | It updates monthly for new holidays so that you are always up to date.
32 |
33 | Required python library: 'ics', just do "pip install ics" on your machine and you should be able to install the module.
34 | """,
35 | #'sequence': '1',
36 | 'author': 'Vertel AB',
37 | 'website': 'https://vertel.se/apps/odoo-calendar/ics_import_holidays',
38 | 'images': ['static/description/banner.png'], # 560x280 px.
39 | 'license': 'AGPL-3',
40 | 'contributor': '',
41 | 'maintainer': 'Vertel AB',
42 | 'repository': 'https://github.com/vertelab/odoo-calendar',
43 | 'depends': ['calendar', 'hr',],
44 | 'data': [
45 | "views/res_config_settings.xml",
46 | ],
47 | 'external_dependencies': {
48 | 'python': ['ics'],
49 | },
50 | }
51 | # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
52 |
--------------------------------------------------------------------------------
/ics_import_holidays/models/__init__.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 | from . import import_holidays_settings, import_holidays
3 |
--------------------------------------------------------------------------------
/ics_import_holidays/models/import_holidays_settings.py:
--------------------------------------------------------------------------------
1 | from ast import Store
2 | import logging
3 | from multiprocessing.sharedctypes import Value
4 | from odoo import fields, models, api, _
5 | import time
6 | import requests
7 |
8 | _logger = logging.getLogger(__name__)
9 | IMPORT = '__import__'
10 |
11 | class ResCalendarSettings(models.TransientModel):
12 | _inherit = 'res.config.settings'
13 |
14 | ics_url = fields.Char(string='Enter the URL of the ICS file', config_parameter='holiday.url.ics')
15 |
16 | @api.model
17 | def create(self, vals_list):
18 | res = super().create(vals_list)
19 |
20 | if (ics_url := vals_list.get("ics_url")):
21 | ics_xmlid = f"{IMPORT}.ics_{time.strftime('%Y-%m-%d_%H:%M:%S')}_{ics_url.replace('.','_')}"
22 | try:
23 | ref_try = self.env.ref(ics_xmlid)
24 | except ValueError:
25 | external_uid = self.env['ir.model.data'].create({'module': IMPORT,
26 | 'name': ics_xmlid.split('.')[-1],
27 | 'model': 'ir.cron'})
28 |
29 | cron_name = 'Update holidays URL: ' + ics_url
30 | calendar_event_cron_model = self.env['ir.model'].search([('model', '=', 'calendar.event')]).id
31 |
32 | if not self.env['ir.cron'].search([('name', '=', cron_name)]):
33 | self.env['ir.cron'].create([{'name': cron_name,
34 | 'model_id': calendar_event_cron_model, 'user_id': 2, 'interval_number': 1,
35 | 'interval_type': 'months', 'code': 'model._holiday_cron()',
36 | 'numbercall': -1}])
37 |
38 | if not self.env['res.users'].search([('login', '=', "holidays")]):
39 | self.env['res.users'].sudo().create({'name': "Holidays", 'login': "holidays"})
40 | return res
41 |
42 |
--------------------------------------------------------------------------------
/ics_import_holidays/security/ir.model.access.csv:
--------------------------------------------------------------------------------
1 | id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
2 | import_holidays,import.holidays,model_import_holidays,,1,1,1,1
3 | import_holidays_settings,import.holidays.settings,model_import_holidays_settings,,1,1,1,1
--------------------------------------------------------------------------------
/ics_import_holidays/static/description/banner.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vertelab/odoo-calendar/ccb8faff00b8a53f4cb423a51d787e45f87914c0/ics_import_holidays/static/description/banner.png
--------------------------------------------------------------------------------
/ics_import_holidays/static/description/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vertelab/odoo-calendar/ccb8faff00b8a53f4cb423a51d787e45f87914c0/ics_import_holidays/static/description/icon.png
--------------------------------------------------------------------------------
/ics_import_holidays/static/description/index.html:
--------------------------------------------------------------------------------
1 |
2 |
26 | Glabels uses a template for the label design and are using a special
27 | notation, ${name}, for including fields from the database. When you
28 | design your labels use a dummy csv-file for your model you want
29 | to tie the report to and the format "Text: coma separated Values
30 | (CSV) with keys on line 1". When the template is ready you can
31 | upload it to the report-record (or include it in the xml-record if
32 | you are building a module). There is a test report action that
33 | also lists all fields for the choosen model.
34 |
47 | This module needs Glabel to be installed on the server (for Ubuntu:
48 | sudo apt install glabels)
49 |
50 | You can test your template (and installation) using glabels-batch-command:
51 | glabels-3-batch -o <out-file> -l -C -i <csv-file> <your template.glabels>
52 | This command are alike both on workstation and server.
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
--------------------------------------------------------------------------------
/ics_import_holidays/static/description/inkscape_export_settings.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vertelab/odoo-calendar/ccb8faff00b8a53f4cb423a51d787e45f87914c0/ics_import_holidays/static/description/inkscape_export_settings.png
--------------------------------------------------------------------------------
/ics_import_holidays/static/description/notes.txt:
--------------------------------------------------------------------------------
1 | odoo-calendar / ics_import_holidays
2 | 2022-08-30
3 |
4 | Be aware of these!
5 | [project]/[module]/static/description/banner.png
6 | [project]/[module]/static/description/icon.png
7 |
8 | Icon: "calendar-check"
9 | Icons may be found at: https://fontawesome.com/v5/cheatsheet
10 |
11 | Odoo banner: 560 x 280
12 | Odoo icon: 140 x 140
13 |
14 | HEX
15 | #930a57
16 |
17 | #8105a7
18 |
19 |
20 | Source: https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Colors/Color_picker_tool
21 |
22 | Guide:
23 | 1. Use Inkscape to create a colored background. (Import)
24 | 2. Odoo icon: 140 x 140, 560 x 280.
25 | 3. Pick icon at fontawesome and paste in a text field.
26 | 4. Save in ordinary / plain svg format.
27 | 5. In Inkscape, choose Generate PNG image and "Export as...".
28 | 6. Write a filename of choice and choose "Export".
29 |
--------------------------------------------------------------------------------
/ics_import_holidays/static/description/odoo_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vertelab/odoo-calendar/ccb8faff00b8a53f4cb423a51d787e45f87914c0/ics_import_holidays/static/description/odoo_icon.png
--------------------------------------------------------------------------------
/ics_import_holidays/views/res_config_settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | res.config.setings.view.form
4 | res.config.settings
5 |
6 |
7 |
8 |
9 |
10 |
Import (currently only one) ICS into schedule and calendar
11 |
12 |
13 |
14 |
15 | ICS URL
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/one_page_website_calendar/__init__.py:
--------------------------------------------------------------------------------
1 | from . import controllers
2 | from . import models
3 |
--------------------------------------------------------------------------------
/one_page_website_calendar/__manifest__.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 | ##############################################################################
3 | #
4 | # Odoo SA, Open Source Management Solution, third party addon
5 | # Copyright (C) 2022- Vertel AB ().
6 | #
7 | # This program is free software: you can redistribute it and/or modify
8 | # it under the terms of the GNU Affero General Public License as
9 | # published by the Free Software Foundation, either version 3 of the
10 | # License, or (at your option) any later version.
11 | #
12 | # This program is distributed in the hope that it will be useful,
13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | # GNU Affero General Public License for more details.
16 | #
17 | # You should have received a copy of the GNU Affero General Public License
18 | # along with this program. If not, see .
19 | #
20 | ##############################################################################
21 |
22 | {
23 | 'name': 'Calendar: One Page Website Calendar',
24 | 'version': '14.0.0.0.1',
25 | # Version ledger: 14.0 = Odoo version. 1 = Major. Non regressionable code. 2 = Minor. New features that are regressionable. 3 = Bug fixes
26 | 'summary': 'Schedule bookings with clients',
27 | 'category': 'Calendar',
28 | 'description': """
29 | Allow clients to Schedule Bookings through your Website
30 | -------------------------------------------------------
31 | """,
32 | #'sequence': '1',
33 | 'sequence': '131',
34 | 'author': 'Vertel AB',
35 | 'website': 'https://vertel.se/apps/odoo-calendar/one_page_website_calendar',
36 | 'images': ['static/description/banner.png'], # 560x280 px.
37 | 'license': 'AGPL-3',
38 | 'contributor': '',
39 | 'maintainer': 'Vertel AB',
40 | 'repository': 'https://github.com/vertelab/odoo-calendar',
41 | 'depends': ['calendar_sms', 'hr', 'website', 'website_calendar_ce'],
42 | 'data': [
43 | 'views/assets.xml',
44 | 'views/snippet.xml',
45 | ],
46 | 'qweb': [
47 | 'static/src/xml/booking.xml',
48 | ],
49 | 'installable': True,
50 | 'application': True,
51 | 'auto_install': False,
52 | }
53 | # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
54 |
--------------------------------------------------------------------------------
/one_page_website_calendar/controllers/__init__.py:
--------------------------------------------------------------------------------
1 | from . import main
2 |
--------------------------------------------------------------------------------
/one_page_website_calendar/models/__init__.py:
--------------------------------------------------------------------------------
1 | from . import calendar_booking
2 |
--------------------------------------------------------------------------------
/one_page_website_calendar/static/description/banner.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vertelab/odoo-calendar/ccb8faff00b8a53f4cb423a51d787e45f87914c0/one_page_website_calendar/static/description/banner.png
--------------------------------------------------------------------------------
/one_page_website_calendar/static/description/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vertelab/odoo-calendar/ccb8faff00b8a53f4cb423a51d787e45f87914c0/one_page_website_calendar/static/description/icon.png
--------------------------------------------------------------------------------
/one_page_website_calendar/static/description/index.html:
--------------------------------------------------------------------------------
1 |
2 |
26 | Glabels uses a template for the label design and are using a special
27 | notation, ${name}, for including fields from the database. When you
28 | design your labels use a dummy csv-file for your model you want
29 | to tie the report to and the format "Text: coma separated Values
30 | (CSV) with keys on line 1". When the template is ready you can
31 | upload it to the report-record (or include it in the xml-record if
32 | you are building a module). There is a test report action that
33 | also lists all fields for the choosen model.
34 |
47 | This module needs Glabel to be installed on the server (for Ubuntu:
48 | sudo apt install glabels)
49 |
50 | You can test your template (and installation) using glabels-batch-command:
51 | glabels-3-batch -o <out-file> -l -C -i <csv-file> <your template.glabels>
52 | This command are alike both on workstation and server.
53 |
54 |
53 |
54 |
55 |
56 |
57 |
--------------------------------------------------------------------------------
/website_calendar_ce/models/__init__.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 |
3 | from . import res_partner
4 | from . import calendar_booking
5 | from . import calendar_event
6 |
--------------------------------------------------------------------------------
/website_calendar_ce/models/res_partner.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 | # This program is free software; you can redistribute it and/or modify
3 | # it under the terms of the GNU General Public License as published by
4 | # the Free Software Foundation; either version 2 of the License, or
5 | # (at your option) any later version.
6 | #
7 | # This program is distributed in the hope that it will be useful,
8 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
9 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 | # GNU General Public License for more details.
11 | #
12 | # You should have received a copy of the GNU General Public License
13 | # along with this program; if not, write to the Free Software
14 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
15 | # MA 02110-1301, USA.
16 | #
17 |
18 | from odoo import fields, models
19 |
20 |
21 | class Partner(models.Model):
22 | _inherit = "res.partner"
23 |
24 | def calendar_verify_availability(self, date_start, date_end):
25 | """ verify availability of the partner(s) between 2 datetimes on their calendar
26 | """
27 | if bool(self.env['calendar.event'].search_count([
28 | ('partner_ids', 'in', self.ids),
29 | '|', '&', ('start', '<', fields.Datetime.to_string(date_end)),
30 | ('stop', '>', fields.Datetime.to_string(date_start)),
31 | '&', ('allday', '=', True),
32 | '|', ('start_date', '=', fields.Date.to_string(date_end)),
33 | ('start_date', '=', fields.Date.to_string(date_start))])):
34 | return False
35 | return True
36 |
--------------------------------------------------------------------------------
/website_calendar_ce/security/ir.model.access.csv:
--------------------------------------------------------------------------------
1 | id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
2 | access_calendar_booking_type_all,calendar.booking.type,model_calendar_booking_type,,1,0,0,0
3 | access_calendar_booking_type_manager,calendar.booking.type.manager,model_calendar_booking_type,group_calendar_manager,1,1,1,1
4 | access_calendar_booking_slot_user,calendar.booking.slot.user,model_calendar_booking_slot,base.group_user,1,0,0,0
5 | access_calendar_booking_slot_manager,calendar.booking.slot.manager,model_calendar_booking_slot,group_calendar_manager,1,1,1,1
6 | access_calendar_booking_question_all,calendar.booking.question,model_calendar_booking_question,,1,0,0,0
7 | access_calendar_booking_question_manager,calendar.booking.question.manager,model_calendar_booking_question,group_calendar_manager,1,1,1,1
8 | access_calendar_booking_question_answer_all,calendar.booking.answer,model_calendar_booking_answer,,1,0,0,0
9 | access_calendar_booking_question_answer_manager,calendar.booking.answer.manager,model_calendar_booking_answer,group_calendar_manager,1,1,1,1
10 | access_calendar_alarm_all,calendar.alarm.all,calendar.model_calendar_alarm,,1,0,0,0
11 | access_calendar_booking_slot_wizard,access_calendar_booking_slot_wizard,model_calendar_booking_slot_wizard,base.group_user,1,1,1,1
12 |
--------------------------------------------------------------------------------
/website_calendar_ce/security/website_calendar_security.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Online Booking
6 | 19
7 |
8 |
9 |
10 | Administrator
11 |
12 |
13 |
14 |
15 |
16 |
17 | Calendar: public: published only
18 |
19 | [('website_published', '=', True)]
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/website_calendar_ce/static/description/banner.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vertelab/odoo-calendar/ccb8faff00b8a53f4cb423a51d787e45f87914c0/website_calendar_ce/static/description/banner.png
--------------------------------------------------------------------------------
/website_calendar_ce/static/description/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vertelab/odoo-calendar/ccb8faff00b8a53f4cb423a51d787e45f87914c0/website_calendar_ce/static/description/icon.png
--------------------------------------------------------------------------------
/website_calendar_ce/static/description/index.html:
--------------------------------------------------------------------------------
1 |
2 |
26 | Glabels uses a template for the label design and are using a special
27 | notation, ${name}, for including fields from the database. When you
28 | design your labels use a dummy csv-file for your model you want
29 | to tie the report to and the format "Text: coma separated Values
30 | (CSV) with keys on line 1". When the template is ready you can
31 | upload it to the report-record (or include it in the xml-record if
32 | you are building a module). There is a test report action that
33 | also lists all fields for the choosen model.
34 |
47 | This module needs Glabel to be installed on the server (for Ubuntu:
48 | sudo apt install glabels)
49 |
50 | You can test your template (and installation) using glabels-batch-command:
51 | glabels-3-batch -o <out-file> -l -C -i <csv-file> <your template.glabels>
52 | This command are alike both on workstation and server.
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
--------------------------------------------------------------------------------
/website_calendar_ce/static/description/inkscape_export_settings.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vertelab/odoo-calendar/ccb8faff00b8a53f4cb423a51d787e45f87914c0/website_calendar_ce/static/description/inkscape_export_settings.png
--------------------------------------------------------------------------------
/website_calendar_ce/static/description/notes.txt:
--------------------------------------------------------------------------------
1 | odoo-calendar / one_page_website_calendar
2 | 2022-08-30
3 |
4 | Be aware of these!
5 | [project]/[module]/static/description/banner.png
6 | [project]/[module]/static/description/icon.png
7 |
8 | Icon: "calendar-check"
9 | Icons may be found at: https://fontawesome.com/v5/cheatsheet
10 |
11 | Odoo banner: 560 x 280
12 | Odoo icon: 140 x 140
13 |
14 | HEX
15 | #930a57
16 |
17 | #8105a7
18 |
19 |
20 | Source: https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Colors/Color_picker_tool
21 |
22 | Guide:
23 | 1. Use Inkscape to create a colored background. (Import)
24 | 2. Odoo icon: 140 x 140, 560 x 280.
25 | 3. Pick icon at fontawesome and paste in a text field.
26 | 4. Save in ordinary / plain svg format.
27 | 5. In Inkscape, choose Generate PNG image and "Export as...".
28 | 6. Write a filename of choice and choose "Export".
29 |
--------------------------------------------------------------------------------
/website_calendar_ce/static/description/odoo_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vertelab/odoo-calendar/ccb8faff00b8a53f4cb423a51d787e45f87914c0/website_calendar_ce/static/description/odoo_icon.png
--------------------------------------------------------------------------------
/website_calendar_ce/static/src/img/client_1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vertelab/odoo-calendar/ccb8faff00b8a53f4cb423a51d787e45f87914c0/website_calendar_ce/static/src/img/client_1.jpg
--------------------------------------------------------------------------------
/website_calendar_ce/static/src/img/client_2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vertelab/odoo-calendar/ccb8faff00b8a53f4cb423a51d787e45f87914c0/website_calendar_ce/static/src/img/client_2.jpg
--------------------------------------------------------------------------------
/website_calendar_ce/static/src/img/client_3.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vertelab/odoo-calendar/ccb8faff00b8a53f4cb423a51d787e45f87914c0/website_calendar_ce/static/src/img/client_3.jpg
--------------------------------------------------------------------------------
/website_calendar_ce/static/src/img/ui/calendar.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vertelab/odoo-calendar/ccb8faff00b8a53f4cb423a51d787e45f87914c0/website_calendar_ce/static/src/img/ui/calendar.jpg
--------------------------------------------------------------------------------
/website_calendar_ce/static/src/img/ui/snippet_thumb.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vertelab/odoo-calendar/ccb8faff00b8a53f4cb423a51d787e45f87914c0/website_calendar_ce/static/src/img/ui/snippet_thumb.jpg
--------------------------------------------------------------------------------
/website_calendar_ce/static/src/js/booking_employee_url.js:
--------------------------------------------------------------------------------
1 | odoo.define('website_calendar_ce.booking_employee_url', function (require) {
2 | 'use strict';
3 |
4 | /**
5 | * This module contains the booking_employee_url widget, created specifically to
6 | * display the direct employee url for a calendar.booking.type.
7 | *
8 | * It's set on the id field and will only exist in readonly mode.
9 | */
10 |
11 | var AbstractField = require('web.AbstractField');
12 | var core = require('web.core');
13 | var fieldRegistry = require('web.field_registry');
14 |
15 | var _t = core._t;
16 |
17 | var FieldemployeeUrl = AbstractField.extend({
18 | events: _.extend({}, AbstractField.prototype.events, {
19 | 'click .o_website_calendar_copy_icon': '_stopPropagation',
20 | 'click .o_form_uri': '_stopPropagation',
21 | }),
22 | supportedFieldTypes: [],
23 |
24 | /**
25 | * This widget should only exist in readonly mode and its value is set to the url.
26 | * Its structure is a div containing a link and a "copy to clipboard" icon.
27 | *
28 | * @override
29 | */
30 | init: function () {
31 | this._super.apply(this, arguments);
32 | this.tagName = 'div';
33 |
34 | this.url = false;
35 | var base_url = this.getSession()['web.base.url'];
36 | var bookingURL = this.record.getContext({fieldName: 'id'}).url;
37 | if (bookingURL) {
38 | this.url = base_url + bookingURL.replace("/booking", "") + '?employee_id=' + this.value;
39 | }
40 | },
41 |
42 | //--------------------------------------------------------------------------
43 | // Private
44 | //--------------------------------------------------------------------------
45 |
46 | /**
47 | * The widget needs to be a link with proper href and a clipboard
48 | * icon that saves the url to the clipboard, classes are added for
49 | * proper design.
50 | *
51 | * @override
52 | * @private
53 | */
54 | _render: function () {
55 | if(!this.url) {
56 | return;
57 | }
58 | var $link = $('', {
59 | class: 'o_form_uri fa-o_text_overflow',
60 | href: this.url,
61 | text: this.url,
62 | });
63 | var $icon = $('
26 | Glabels uses a template for the label design and are using a special
27 | notation, ${name}, for including fields from the database. When you
28 | design your labels use a dummy csv-file for your model you want
29 | to tie the report to and the format "Text: coma separated Values
30 | (CSV) with keys on line 1". When the template is ready you can
31 | upload it to the report-record (or include it in the xml-record if
32 | you are building a module). There is a test report action that
33 | also lists all fields for the choosen model.
34 |
47 | This module needs Glabel to be installed on the server (for Ubuntu:
48 | sudo apt install glabels)
49 |
50 | You can test your template (and installation) using glabels-batch-command:
51 | glabels-3-batch -o <out-file> -l -C -i <csv-file> <your template.glabels>
52 | This command are alike both on workstation and server.
53 |
54 |
26 | Glabels uses a template for the label design and are using a special
27 | notation, ${name}, for including fields from the database. When you
28 | design your labels use a dummy csv-file for your model you want
29 | to tie the report to and the format "Text: coma separated Values
30 | (CSV) with keys on line 1". When the template is ready you can
31 | upload it to the report-record (or include it in the xml-record if
32 | you are building a module). There is a test report action that
33 | also lists all fields for the choosen model.
34 |
47 | This module needs Glabel to be installed on the server (for Ubuntu:
48 | sudo apt install glabels)
49 |
50 | You can test your template (and installation) using glabels-batch-command:
51 | glabels-3-batch -o <out-file> -l -C -i <csv-file> <your template.glabels>
52 | This command are alike both on workstation and server.
53 |
54 |