You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
File naming
File nextcloud_base.py contains a definition of an AbstractModel, so the file could be named abstract_nextcloud_base.py for better readability.
Same discourse for file nextcloud_caldav.py: it could be named abstract_nextcloud_caldav.py.
Model naming
Models like nc.calendar, nc.sync.log, nc.sync.user should be renamed to nextcloud.calendar, nextcloud.sync.log,nextcloud.sync.user , so that the corresponding name of tables in database will be more explicit. It's also the same naming as it was made for abstract models: nextcloud.base and nextcloud.caldav, so the naming will be more consistent.
Definition of model calendar.event.nchash should be placed in a separate file. Also this model should be renamed consistently to the other models, for example renamed to: nextcloud.calendar.event.nchash.
Field naming
Some models are inherited from standard Odoo: calendar.event, calendar.recurrence, res.config.settings, res.partner, res.users. In those models, the naming of fields should be not conflicting with any other module that could potentially adopt the same name. Proposal is to rename the following:
calendar.event: all fields name prefix from nc_* to nextcloud_*
calendar.recurrence: field nc_exdate to nextcloud_exdate
res.config.settings: field enable_calendar_sync to nextcloud_enable_calendar_sync and log_capacity to nextcloud_log_capacity
res.partner: field nc_sync to nextcloud_sync
res.users: field nc_calendar_ids to nextcloud_calendar_ids
Context parameters naming
When passing parameters in context, the name of the parameter should be not conflicting with any other module that could potentially use the same name for context parameters. So for example:
with_context(sync=True) should become with_context(nextcloud_sync=True)
self._context.get("sync", False) should become self._context.get("nextcloud_sync", False)
and so on...
The text was updated successfully, but these errors were encountered:
File naming
File
nextcloud_base.py
contains a definition of an AbstractModel, so the file could be namedabstract_nextcloud_base.py
for better readability.Same discourse for file
nextcloud_caldav.py
: it could be namedabstract_nextcloud_caldav.py
.Model naming
Models like
nc.calendar
,nc.sync.log
,nc.sync.user
should be renamed tonextcloud.calendar
,nextcloud.sync.log,
nextcloud.sync.user
, so that the corresponding name of tables in database will be more explicit. It's also the same naming as it was made for abstract models:nextcloud.base
andnextcloud.caldav
, so the naming will be more consistent.Definition of model
calendar.event.nchash
should be placed in a separate file. Also this model should be renamed consistently to the other models, for example renamed to:nextcloud.calendar.event.nchash
.Field naming
Some models are inherited from standard Odoo:
calendar.event
,calendar.recurrence
,res.config.settings
,res.partner
,res.users
. In those models, the naming of fields should be not conflicting with any other module that could potentially adopt the same name. Proposal is to rename the following:nc_*
tonextcloud_*
nc_exdate
tonextcloud_exdate
enable_calendar_sync
tonextcloud_enable_calendar_sync
andlog_capacity
tonextcloud_log_capacity
nc_sync
tonextcloud_sync
nc_calendar_ids
tonextcloud_calendar_ids
Context parameters naming
When passing parameters in context, the name of the parameter should be not conflicting with any other module that could potentially use the same name for context parameters. So for example:
with_context(sync=True)
should becomewith_context(nextcloud_sync=True)
self._context.get("sync", False)
should becomeself._context.get("nextcloud_sync", False)
The text was updated successfully, but these errors were encountered: