├── .gitignore ├── calander_full_form ├── __init__.py ├── __manifest__.py ├── static │ └── description │ │ ├── banner.png │ │ ├── banner_560x280.svg │ │ ├── icon.png │ │ ├── icon_140x140.svg │ │ ├── index.html │ │ ├── inkscape_export_settings.png │ │ └── notes.txt └── views │ └── calendar_view.xml ├── calendar_attendee_planning ├── __init__.py ├── __manifest__.py ├── i18n │ └── sv_SE.po ├── models │ ├── __init__.py │ ├── calendar_attendee.py │ ├── calendar_event.py │ ├── hr_employee.py │ └── hr_leave.py ├── static │ └── description │ │ ├── banner.png │ │ ├── banner_560x280.svg │ │ ├── icon.png │ │ ├── icon_140x140.svg │ │ ├── inkscape_export_settings_20-04.png │ │ ├── inkscape_export_settings_22-04.png │ │ ├── notes.txt │ │ └── vertel_icon.png ├── tests │ ├── __init__.py │ └── test_state_change.py └── views │ └── calendar_view.xml ├── calendar_ics ├── __init__.py ├── __manifest__.py ├── controllers │ ├── __init__.py │ └── main.py ├── data │ └── res_partner_data.xml ├── demo │ └── calendar_ics_demo.xml ├── models │ ├── __init__.py │ ├── calendar.py │ └── res_partner.py ├── security │ └── ir.model.access.csv ├── static │ └── description │ │ ├── banner.png │ │ ├── banner_560x280.svg │ │ ├── icon.png │ │ ├── icon_140x140.svg │ │ ├── index.html │ │ ├── inkscape_export_settings.png │ │ └── notes.txt └── views │ ├── calendar_view.xml │ └── res_partner_view.xml ├── calendar_resource_booking ├── __init__.py ├── __manifest__.py ├── models │ ├── __init__.py │ └── calendar_event.py └── views │ └── calendar_view.xml ├── calendar_skills_allergies_glue ├── __init__.py ├── __manifest__.py ├── models │ ├── __init__.py │ ├── calendar_attendee.py │ └── contract_contract.py ├── static │ └── description │ │ ├── banner.png │ │ ├── banner_560x280.svg │ │ ├── icon.png │ │ ├── icon_140x140.svg │ │ ├── inkscape_export_settings_20-04.png │ │ ├── inkscape_export_settings_22-04.png │ │ └── notes.txt └── views │ └── calendar_view.xml ├── calendar_sync ├── __init__.py ├── __manifest__.py ├── controllers │ ├── __init__.py │ └── controllers.py └── static │ └── description │ ├── banner.png │ ├── banner_560x280.svg │ ├── icon.png │ ├── icon_140x140.svg │ ├── index.html │ ├── inkscape_export_settings.png │ └── notes.txt ├── extended_calendar_notifications ├── README.rst ├── __init__.py ├── __manifest__.py ├── data │ └── mail_template.xml ├── models │ ├── __init__.py │ └── models.py ├── security │ └── ir.model.access.csv └── static │ ├── description │ ├── banner.png │ ├── banner_560x280.svg │ ├── icon.png │ ├── icon_140x140.svg │ ├── index.html │ ├── inkscape_export_settings.png │ └── notes.txt │ ├── src │ ├── images │ │ └── icon.png │ └── readme.txt │ └── xx_description │ ├── assets │ ├── icons │ │ └── readme.txt │ ├── modules │ │ └── readme.txt │ ├── readme.txt │ └── screenshots │ │ └── readme.txt │ ├── banner.svg │ ├── icon.svg │ └── index.html ├── ics_import_holidays ├── __init__.py ├── __manifest__.py ├── models │ ├── __init__.py │ ├── import_holidays.py │ └── import_holidays_settings.py ├── security │ └── ir.model.access.csv ├── static │ └── description │ │ ├── banner.png │ │ ├── banner_560x280.svg │ │ ├── icon.png │ │ ├── icon_140x140.svg │ │ ├── index.html │ │ ├── inkscape_export_settings.png │ │ ├── notes.txt │ │ └── odoo_icon.png └── views │ └── res_config_settings.xml ├── one_page_website_calendar ├── __init__.py ├── __manifest__.py ├── controllers │ ├── __init__.py │ └── main.py ├── models │ ├── __init__.py │ └── calendar_booking.py ├── static │ ├── description │ │ ├── banner.png │ │ ├── banner_560x280.svg │ │ ├── icon.png │ │ ├── icon_140x140.svg │ │ ├── index.html │ │ ├── inkscape_export_settings.png │ │ ├── notes.txt │ │ └── odoo_icon.png │ └── src │ │ ├── img │ │ └── calendar.jpg │ │ ├── js │ │ ├── booking_snippets_options.js │ │ ├── booking_time_slot.js │ │ └── complete_booking.js │ │ ├── scss │ │ └── website_calendar_ce.scss │ │ └── xml │ │ └── booking.xml └── views │ ├── assets.xml │ └── snippet.xml ├── requirements.txt ├── website_booking_checkout ├── __init__.py ├── __manifest__.py ├── controllers │ ├── __init__.py │ └── main.py ├── models │ ├── __init__.py │ ├── calendar_booking.py │ ├── product.py │ └── sale_order.py ├── security │ └── ir.model.access.csv ├── static │ ├── description │ │ ├── banner.png │ │ ├── banner_560x280.svg │ │ ├── icon.png │ │ ├── icon_140x140.svg │ │ ├── inkscape_export_settings_20-04.png │ │ ├── inkscape_export_settings_22-04.png │ │ └── notes.txt │ └── src │ │ └── js │ │ └── website_calendar_ce.js └── views │ ├── product_view.xml │ ├── sale_order_view.xml │ └── templates.xml ├── website_calendar_ce ├── __init__.py ├── __manifest__.py ├── controllers │ ├── __init__.py │ ├── calendar.py │ └── main.py ├── data │ ├── mail.xml │ ├── website_calendar_data.xml │ └── website_calendar_demo.xml ├── i18n │ └── sv_SE.po ├── models │ ├── __init__.py │ ├── calendar_booking.py │ ├── calendar_event.py │ └── res_partner.py ├── security │ ├── ir.model.access.csv │ └── website_calendar_security.xml ├── static │ ├── description │ │ ├── banner.png │ │ ├── banner_560x280.svg │ │ ├── icon.png │ │ ├── icon_140x140.svg │ │ ├── index.html │ │ ├── inkscape_export_settings.png │ │ ├── notes.txt │ │ ├── odoo_icon.png │ │ └── odoo_icon.svg │ └── src │ │ ├── img │ │ ├── client_1.jpg │ │ ├── client_2.jpg │ │ ├── client_3.jpg │ │ └── ui │ │ │ ├── calendar.jpg │ │ │ └── snippet_thumb.jpg │ │ ├── js │ │ ├── booking_employee_url.js │ │ ├── booking_snippets_options.js │ │ ├── website_calendar.editor.js │ │ └── website_calendar_ce.js │ │ ├── scss │ │ ├── booking_employee_url.scss │ │ └── website_calendar_ce.scss │ │ └── xml │ │ └── booking.xml └── views │ ├── calendar_booking_views.xml │ ├── calendar_views.xml │ ├── snippets │ └── snippets.xml │ └── website_calendar_templates.xml ├── website_calendar_event ├── __init__.py ├── __manifest__.py ├── controllers │ ├── __init__.py │ ├── main.py │ └── portal.py ├── models │ ├── __init__.py │ ├── calendar_booking.py │ ├── calendar_event.py │ └── project.py ├── static │ └── description │ │ ├── banner.png │ │ ├── banner_560x280.svg │ │ ├── icon.png │ │ ├── icon_140x140.svg │ │ ├── index.html │ │ ├── inkscape_export_settings.png │ │ └── notes.txt └── views │ ├── calendar_booking_views.xml │ ├── project.xml │ └── project_portal_templates.xml ├── website_calendar_product_resource ├── __init__.py ├── __manifest__.py ├── controllers │ ├── __init__.py │ └── main.py ├── data │ └── website_calendar_data.xml ├── models │ ├── __init__.py │ ├── calendar_booking.py │ ├── product.py │ └── resource.py ├── static │ ├── description │ │ ├── banner.png │ │ ├── banner_560x280.svg │ │ ├── icon.png │ │ ├── icon_140x140.svg │ │ ├── inkscape_export_settings_20-04.png │ │ ├── inkscape_export_settings_22-04.png │ │ └── notes.txt │ └── src │ │ └── js │ │ └── website_calendar_ce.js └── views │ ├── calendar_booking_view.xml │ ├── product_view.xml │ ├── resource_view.xml │ └── website_calendar_templates.xml ├── website_calendar_slot_range ├── __init__.py ├── __manifest__.py ├── controllers │ ├── __init__.py │ └── main.py ├── static │ ├── description │ │ ├── banner.png │ │ ├── banner_560x280.svg │ │ ├── icon.png │ │ ├── icon_140x140.svg │ │ ├── inkscape_export_settings_20-04.png │ │ ├── inkscape_export_settings_22-04.png │ │ └── notes.txt │ └── src │ │ └── js │ │ └── website_calendar_ce.js └── views │ └── website_calendar_templates.xml ├── website_calendar_waitlist ├── __init__.py ├── __manifest__.py ├── controllers │ ├── __init__.py │ ├── main.py │ └── portal.py ├── models │ ├── __init__.py │ └── calendar_booking.py ├── security │ └── ir.model.access.csv ├── static │ └── description │ │ ├── banner.png │ │ ├── banner_560x280.svg │ │ ├── icon.png │ │ ├── icon_140x140.svg │ │ ├── index.html │ │ ├── inkscape_export_settings.png │ │ └── notes.txt └── views │ ├── calendar_booking_views.xml │ ├── project_portal_templates.xml │ └── website_waitlist_templates.xml └── website_form_calendar ├── __init__.py ├── __manifest__.py ├── controllers ├── __init__.py └── main.py ├── data └── website_calendar_data.xml ├── models └── __init__.py ├── static └── src │ └── js │ └── website_form_calendar_editor.js └── views └── website_form_calendar_assets.xml /.gitignore: -------------------------------------------------------------------------------- 1 | *.pyc 2 | *.swp 3 | *~ 4 | -------------------------------------------------------------------------------- /calander_full_form/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vertelab/odoo-calendar/ccb8faff00b8a53f4cb423a51d787e45f87914c0/calander_full_form/__init__.py -------------------------------------------------------------------------------- /calander_full_form/__manifest__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | ############################################################################## 3 | # 4 | # Odoo, Open Source Management Solution, third party addon 5 | # Copyright (C) 2021- 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 | 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 | { 24 | 'name': 'Calendar: Calender Full Form', 25 | 'version': '14.0.0.0', 26 | # Version ledger: 14.0 = Odoo version. 1 = Major. Non regressionable code. 2 = Minor. New features that are regressionable. 3 = Bug fixes 27 | 'summary': 'To be able to open calendar form view instead of a popup.', 28 | 'category': 'Calendar', 29 | 'description': """ 30 | To be able to open calendar form view instead of a popup 31 | """, 32 | 'author': 'Vertel AB', 33 | 'website': 'https://vertel.se/apps/odoo-calendar/calender_full_form', 34 | 'images': ['static/description/banner.png'], # 560x280 px. 35 | 'license': 'AGPL-3', 36 | 'maintainer': 'Vertel AB', 37 | 'repository': 'https://github.com/vertelab/odoo-calendar', 38 | #'sequence': '1', 39 | 'depends': ['calendar'], 40 | 'data': [ 41 | 'views/calendar_view.xml' 42 | ], 43 | 'application': True, 44 | 'installable': True, 45 | } 46 | # vim:expandtab:smartindent:tabstop=4s:softtabstop=4:shiftwidth=4: 47 | -------------------------------------------------------------------------------- /calander_full_form/static/description/banner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vertelab/odoo-calendar/ccb8faff00b8a53f4cb423a51d787e45f87914c0/calander_full_form/static/description/banner.png -------------------------------------------------------------------------------- /calander_full_form/static/description/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vertelab/odoo-calendar/ccb8faff00b8a53f4cb423a51d787e45f87914c0/calander_full_form/static/description/icon.png -------------------------------------------------------------------------------- /calander_full_form/static/description/index.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Record-keeping for Odoo

4 |

Keep all documents in one place

5 |
6 |
7 | 8 |
9 |
10 |
11 |

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 |

17 |

18 | Record-keeping 19 |

20 |
21 |
22 |
23 | 24 |
25 |
26 |

Design labels using notation

27 |
28 |

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 |

38 |

Example of code for a module:

39 |
40 |     <report string="Sample Glabels" id="action_glabels_sample_report" model="res.partner" 
41 |                             report_type="glabels" name="report_glabels.glabels_sample_report" />
42 |     
43 |     <record id="action_glabels_sample_report" model="ir.actions.report.xml">
44 |         <field name="glabels_template" type="base64" file="report_glabels/sample.glabels" />
45 |     </record>
46 |         
47 |         
48 | 49 |

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:

15 |

${object.ics_url_field}

16 | ]]> 17 |
18 |
19 | 20 | 21 | Generate Recurring Calendar updates for Partners 22 | 15 23 | minutes 24 | -1 25 | 26 | model.ics_cron_job() 27 | code 28 | 29 |
30 |
31 | -------------------------------------------------------------------------------- /calendar_ics/models/__init__.py: -------------------------------------------------------------------------------- 1 | from . import calendar 2 | from . import res_partner 3 | -------------------------------------------------------------------------------- /calendar_ics/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_ics_manager,res.groups,model_calendar_ics,base.group_erp_manager,1,1,1,1 3 | access_calendar_ics_all,res.groups,model_calendar_ics,,1,0,0,0 4 | -------------------------------------------------------------------------------- /calendar_ics/static/description/banner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vertelab/odoo-calendar/ccb8faff00b8a53f4cb423a51d787e45f87914c0/calendar_ics/static/description/banner.png -------------------------------------------------------------------------------- /calendar_ics/static/description/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vertelab/odoo-calendar/ccb8faff00b8a53f4cb423a51d787e45f87914c0/calendar_ics/static/description/icon.png -------------------------------------------------------------------------------- /calendar_ics/static/description/index.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Calendar for Odoo

4 |

Keep track of time

5 |
6 |
7 | 8 |
9 |
10 |
11 |

12 | Schedule bookings with clients. 13 |

14 |

15 | Record-keeping 16 |

17 |
18 |
19 |
20 | 21 |
22 |
23 |

Odoo Calendar -- keep track of time!

24 |
25 |

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 |

35 |

Example of code for a module:

36 |
37 |     <report string="Sample Glabels" id="action_glabels_sample_report" model="res.partner" 
38 |                             report_type="glabels" name="report_glabels.glabels_sample_report" />
39 |     
40 |     <record id="action_glabels_sample_report" model="ir.actions.report.xml">
41 |         <field name="glabels_template" type="base64" file="report_glabels/sample.glabels" />
42 |     </record>
43 |         
44 |         
45 | 46 |

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 |