-
-
Notifications
You must be signed in to change notification settings - Fork 273
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[MIG] base_dav: Migration to 17.0 #269
Open
jaydeep32
wants to merge
60
commits into
OCA:17.0
Choose a base branch
from
archeti-org:17.0-mig-base_dav
base: 17.0
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 54 commits
Commits
Show all changes
60 commits
Select commit
Hold shift + click to select a range
7844e6e
[MIG] base_dav: Migration to 17.0
jaydeep32 5e3179e
[IMP] base_dav: Some test cases fixes,odoo tools safe_eval fixes.
jaydeep32 a244bd5
[IMP] base_dav: pre-commit auto fixes
jaydeep32 10d533d
[UPD] base_dav: python package version
jaydeep32 804cce3
[UPD] base_dav: Module external_dependencies with version.
jaydeep32 a14edea
Translated using Weblate (Spanish)
Ivorra78 2efc7ea
Translated using Weblate (Italian)
mymage a6546d7
[ADD] base_user_role_company: add per company user roles
Chandresh-OSI e063507
[UPD] Update base_user_role_company.pot
oca-travis 0fba526
[UPD] README.rst
OCA-git-bot 5a15310
[ADD] icon.png
OCA-git-bot 2976844
[FIX] base_user_role_company: wrong xpath
kos94ok-3D 9752e9c
base_user_role_company 14.0.1.1.0
OCA-git-bot b7c3aa6
Added translation using Weblate (Italian)
31b92c7
[FIX] base_user_role_company: roles not properly applied on login
dreispt c6ef4fa
Translated using Weblate (Italian)
b0b99e0
[FIX] base_user_role_company: wrong menus on re-login
dreispt e81489f
[FIX] base_user_role_company: fix tests
dreispt 8e0628d
[UPD] Update base_user_role_company.pot
oca-travis 677b853
base_user_role_company 14.0.2.0.0
OCA-git-bot 2aa2b91
Update translation files
oca-transbot 20abc76
base_user_role_company 14.0.2.0.1
OCA-git-bot 51e54c0
Translated using Weblate (Italian)
francesco-ooops 581fb46
[IMP] base_user_role_company: pre-commit stuff
Urvisha-OSI 81827d8
[MIG] base_user_role_company: Migration to 16.0
Urvisha-OSI a06728a
[UPD] Update base_user_role_company.pot
4f3f215
[UPD] README.rst
OCA-git-bot a9d2730
Update translation files
weblate 2d62260
Added translation using Weblate (Spanish)
Ivorra78 636856b
Translated using Weblate (Spanish)
Ivorra78 62a2ce4
Added translation using Weblate (Portuguese)
pedrocs-exo 17cca66
Translated using Weblate (Portuguese)
pedrocs-exo adc2775
[UPD] README.rst
OCA-git-bot 123105f
[FIX] base_user_role_company: Pylint fix
etobella 476a7e9
[UPD] Update base_user_role_company.pot
bc7eb51
[BOT] post-merge updates
OCA-git-bot 19b974e
Update translation files
weblate f6ebd77
Translated using Weblate (Spanish)
Ivorra78 90bcc47
Translated using Weblate (Italian)
mymage e761802
base_user_role_company: allow same role in different companies
sebalix 47dabe2
[BOT] post-merge updates
OCA-git-bot bd2f05f
[IMP] base_user_role_company: black, isort, prettier
rconjour a9a9375
[MIG] base_user_role_company: Migration to 17.0
rconjour b230874
Translated using Weblate (Italian)
mymage 3b33180
Merge PR #270 into 17.0
OCA-git-bot ee371e8
[UPD] Update base_user_role_company.pot
5fe5154
[BOT] post-merge updates
OCA-git-bot 32f575a
[ADD] base_dav
hbrunn 54b7a7f
Fix CI errors
fkantelberg dd23c30
Mute radicale logger for testing
fkantelberg e194c4a
Use the collection as first argument in the creation of the items
fkantelberg f1a711c
Use related model_id field to build domain
fkantelberg f9b5973
Set default id for fields
fkantelberg 555cf49
Add missing quotation
fkantelberg b5b9e20
[UPD] Update base_dav.pot
oca-travis 8b51c3e
[UPD] README.rst
OCA-git-bot 3911e59
[UPD] README.rst
OCA-git-bot 596854d
[IMP] base_dav: pre-commit auto fixes
jaydeep32 9106fc5
[MIG] base_dav: Migration to 17.0
jaydeep32 360893e
Merge branch '17.0-mig-base_dav' of https://github.com/archeti-org/se…
jaydeep32 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,128 @@ | ||
========================== | ||
Caldav and Carddav support | ||
========================== | ||
|
||
.. | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
!! This file is generated by oca-gen-addon-readme !! | ||
!! changes will be overwritten. !! | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
!! source digest: sha256:6cc5b91f1cff865b4527a2097534adb50c8bade6eaed9f3b820275b7b8ab19d3 | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
|
||
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png | ||
:target: https://odoo-community.org/page/development-status | ||
:alt: Beta | ||
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png | ||
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html | ||
:alt: License: AGPL-3 | ||
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fserver--backend-lightgray.png?logo=github | ||
:target: https://github.com/OCA/server-backend/tree/17.0/base_dav | ||
:alt: OCA/server-backend | ||
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png | ||
:target: https://translation.odoo-community.org/projects/server-backend-17-0/server-backend-17-0-base_dav | ||
:alt: Translate me on Weblate | ||
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png | ||
:target: https://runboat.odoo-community.org/builds?repo=OCA/server-backend&target_branch=17.0 | ||
:alt: Try me on Runboat | ||
|
||
|badge1| |badge2| |badge3| |badge4| |badge5| | ||
|
||
This module adds WebDAV support to Odoo, specifically CalDAV and | ||
CardDAV. | ||
|
||
You can configure arbitrary objects as a calendar or an address book, | ||
thus make arbitrary information accessible in external systems or your | ||
mobile. | ||
|
||
**Table of contents** | ||
|
||
.. contents:: | ||
:local: | ||
|
||
Configuration | ||
============= | ||
|
||
To configure this module, you need to: | ||
|
||
1. go to Settings / WebDAV Collections and create or edit your | ||
collections. There, you'll also see the URL to point your clients to. | ||
|
||
Note that you need to configure a dbfilter if you use multiple | ||
databases. | ||
|
||
Known issues / Roadmap | ||
====================== | ||
|
||
- much better UX for configuring collections (probably provide a group | ||
that sees the current fully flexible field mappings, and by default | ||
show some dumbed down version where you can select some preselected | ||
vobject fields) | ||
- support todo lists and journals | ||
- support configuring default field mappings per model | ||
- support plain WebDAV collections to make some model's records | ||
accessible as folders, and the records' attachments as files (r/w) | ||
- support configuring lists of calendars so that you can have a | ||
calendar for every project and appointments are tasks, or a calendar | ||
for every sales team and appointments are sale orders. Lots of | ||
possibilities | ||
|
||
Backporting this to <=v10 will be tricky because radicale only supports | ||
python3. Probably it will be quite a hassle to backport the relevant | ||
code, so it might be more sensible to just backport the configuration | ||
part, and implement the rest as radicale auth/storage plugin that talks | ||
to Odoo via odoorpc. It should be possible to recycle most of the code | ||
from this addon, which actually implements those plugins, but then | ||
within Odoo. | ||
|
||
In order to install this module and use it make sure you use right version of `radicale==2.1.12` library. | ||
|
||
|
||
Bug Tracker | ||
=========== | ||
|
||
Bugs are tracked on `GitHub Issues <https://github.com/OCA/server-backend/issues>`_. | ||
In case of trouble, please check there if your issue has already been reported. | ||
If you spotted it first, help us to smash it by providing a detailed and welcomed | ||
`feedback <https://github.com/OCA/server-backend/issues/new?body=module:%20base_dav%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_. | ||
|
||
Do not contact contributors directly about support or help with technical issues. | ||
|
||
Credits | ||
======= | ||
|
||
Authors | ||
------- | ||
|
||
* initOS GmbH | ||
* Therp BV | ||
|
||
Contributors | ||
------------ | ||
|
||
- Holger Brunn <[email protected]> | ||
- Florian Kantelberg <[email protected]> | ||
|
||
Other credits | ||
------------- | ||
|
||
- Odoo Community Association: | ||
`Icon <https://github.com/OCA/maintainer-tools/blob/master/template/module/static/description/icon.svg>`__ | ||
- All the actual work is done by `Radicale <https://radicale.org>`__ | ||
|
||
Maintainers | ||
----------- | ||
|
||
This module is maintained by the OCA. | ||
|
||
.. image:: https://odoo-community.org/logo.png | ||
:alt: Odoo Community Association | ||
:target: https://odoo-community.org | ||
|
||
OCA, or the Odoo Community Association, is a nonprofit organization whose | ||
mission is to support the collaborative development of Odoo features and | ||
promote its widespread use. | ||
|
||
This module is part of the `OCA/server-backend <https://github.com/OCA/server-backend/tree/17.0/base_dav>`_ project on GitHub. | ||
|
||
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Copyright 2018 Therp BV <https://therp.nl> | ||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). | ||
from . import models | ||
from . import controllers | ||
from . import radicale |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Copyright 2018 Therp BV <https://therp.nl> | ||
# Copyright 2019-2020 initOS GmbH <https://initos.com> | ||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). | ||
{ | ||
"name": "Caldav and Carddav support", | ||
"version": "17.0.1.0.0", | ||
"author": "initOS GmbH,Therp BV,Odoo Community Association (OCA)", | ||
"license": "AGPL-3", | ||
"category": "Extra Tools", | ||
"summary": "Access Odoo data as calendar or address book", | ||
"website": "https://github.com/OCA/server-backend", | ||
"depends": [ | ||
"base", | ||
], | ||
"demo": [ | ||
"demo/dav_collection.xml", | ||
], | ||
"data": [ | ||
"views/dav_collection.xml", | ||
"security/ir.model.access.csv", | ||
], | ||
"external_dependencies": { | ||
"python": ["radicale==2.1.12"], | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Copyright 2018 Therp BV <https://therp.nl> | ||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). | ||
from . import main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
# Copyright 2018 Therp BV <https://therp.nl> | ||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). | ||
|
||
import logging | ||
from configparser import RawConfigParser as ConfigParser | ||
|
||
import werkzeug | ||
|
||
from odoo import http | ||
from odoo.http import request | ||
|
||
try: | ||
import radicale | ||
# from radicale import config | ||
except ImportError: | ||
radicale = None | ||
|
||
PREFIX = "/.dav" | ||
|
||
|
||
class Main(http.Controller): | ||
@http.route( | ||
["/.well-known/carddav", "/.well-known/caldav", "/.well-known/webdav"], | ||
type="http", | ||
auth="none", | ||
csrf=False, | ||
) | ||
def handle_well_known_request(self): | ||
return werkzeug.utils.redirect(PREFIX, 301) | ||
|
||
@http.route( | ||
[PREFIX, "%s/<path:davpath>" % PREFIX], | ||
type="http", | ||
auth="none", | ||
csrf=False, | ||
) | ||
def handle_dav_request(self, davpath=None): | ||
config = ConfigParser() | ||
for section, values in radicale.config.INITIAL_CONFIG.items(): | ||
config.add_section(section) | ||
for key, data in values.items(): | ||
config.set(section, key, data["value"]) | ||
config.set("auth", "type", "odoo.addons.base_dav.radicale.auth") | ||
config.set("storage", "type", "odoo.addons.base_dav.radicale.collection") | ||
config.set("rights", "type", "odoo.addons.base_dav.radicale.rights") | ||
config.set("web", "type", "none") | ||
application = radicale.Application( | ||
config, | ||
logging.getLogger("radicale"), | ||
) | ||
|
||
response = None | ||
|
||
def start_response(status, headers): | ||
nonlocal response | ||
response = http.Response(status=status, headers=headers) | ||
|
||
result = application( | ||
dict( | ||
request.httprequest.environ, | ||
HTTP_X_SCRIPT_NAME=PREFIX, | ||
PATH_INFO=davpath or "", | ||
), | ||
start_response, | ||
) | ||
response.stream.write(result and result[0] or b"") | ||
return response |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<odoo> | ||
<record id="collection_addressbook" model="dav.collection"> | ||
<field name="name">Addressbook</field> | ||
<field name="dav_type">addressbook</field> | ||
<field name="model_id" ref="base.model_res_partner" /> | ||
<field name="domain">[]</field> | ||
</record> | ||
<record id="field_mapping_addressbook_n" model="dav.collection.field_mapping"> | ||
<field name="name">N</field> | ||
<field name="field_id" ref="base.field_res_partner__name" /> | ||
<field name="collection_id" ref="collection_addressbook" /> | ||
</record> | ||
<record id="field_mapping_addressbook_fn" model="dav.collection.field_mapping"> | ||
<field name="name">FN</field> | ||
<field name="field_id" ref="base.field_res_partner__display_name" /> | ||
<field name="collection_id" ref="collection_addressbook" /> | ||
</record> | ||
<record id="field_mapping_addressbook_photo" model="dav.collection.field_mapping"> | ||
<field name="name">photo</field> | ||
<field name="field_id" ref="base.field_res_partner__image_1920" /> | ||
<field name="collection_id" ref="collection_addressbook" /> | ||
</record> | ||
<record id="field_mapping_addressbook_email" model="dav.collection.field_mapping"> | ||
<field name="name">email</field> | ||
<field name="field_id" ref="base.field_res_partner__email" /> | ||
<field name="collection_id" ref="collection_addressbook" /> | ||
</record> | ||
<record id="field_mapping_addressbook_tel" model="dav.collection.field_mapping"> | ||
<field name="name">tel</field> | ||
<field name="field_id" ref="base.field_res_partner__phone" /> | ||
<field name="collection_id" ref="collection_addressbook" /> | ||
</record> | ||
</odoo> |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this be >= ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here, I use this specific module version because this module's code is only compatible with this 2.1.12 or older version of
radical.
If you check this #254 issue here, @AquaMCU has mentioned that he is having this strange error in the log,so I solved that by changing the module version to
radicale==2.1.12.
Also, if possible, can we add @AquaMCU to the discussion since he is the one who has migrated the module?
Actually, he was not able to create PR, so I simply made that for him