[IMP]portal: set logger
bzr revid: kjo@tinyerp.com-20120622065756-hgi4crut0gqr9n63
This commit is contained in:
parent
3c50eb017a
commit
179234552e
|
@ -149,7 +149,7 @@ class account_installer(osv.osv_memory):
|
|||
cr, uid, ids, context=context)
|
||||
chart = self.read(cr, uid, ids, ['charts'],
|
||||
context=context)[0]['charts']
|
||||
self._logger.debug('Installing chart of accounts %s', chart)
|
||||
_logger.debug('Installing chart of accounts %s', chart)
|
||||
return modules | set([chart])
|
||||
|
||||
account_installer()
|
||||
|
|
|
@ -725,13 +725,13 @@ class Calendar(CalDAV, osv.osv):
|
|||
objs.append(cal_children[child.name.lower()])
|
||||
elif child.name.upper() == 'CALSCALE':
|
||||
if child.value.upper() != 'GREGORIAN':
|
||||
self._logger.warning('How do I handle %s calendars?',child.value)
|
||||
_logger.warning('How do I handle %s calendars?',child.value)
|
||||
elif child.name.upper() in ('PRODID', 'VERSION'):
|
||||
pass
|
||||
elif child.name.upper().startswith('X-'):
|
||||
self._logger.debug("skipping custom node %s", child.name)
|
||||
_logger.debug("skipping custom node %s", child.name)
|
||||
else:
|
||||
self._logger.debug("skipping node %s", child.name)
|
||||
_logger.debug("skipping node %s", child.name)
|
||||
|
||||
res = []
|
||||
for obj_name in list(set(objs)):
|
||||
|
|
|
@ -21,6 +21,8 @@
|
|||
|
||||
from osv import osv, fields
|
||||
from tools.translate import _
|
||||
import logging
|
||||
_logger = logging.getLogger(__name__)
|
||||
|
||||
UID_ROOT = 1
|
||||
SHARED_DOCS_MENU = "Documents"
|
||||
|
@ -164,19 +166,19 @@ class share_wizard_portal(osv.osv_memory):
|
|||
# v6.1, the algorithm for combining them will OR the rules, hence
|
||||
# extending the visible data.
|
||||
Rules.write(cr, UID_ROOT, share_rule_ids, {'groups': [(4,target_group.id)]})
|
||||
self._logger.debug("Linked sharing rules from temporary sharing group to group %s", target_group)
|
||||
_logger.debug("Linked sharing rules from temporary sharing group to group %s", target_group)
|
||||
|
||||
# Copy the access rights. This is appropriate too because
|
||||
# groups have the UNION of all permissions granted by their
|
||||
# access right lines.
|
||||
for access_line in share_group.model_access:
|
||||
Rights.copy(cr, UID_ROOT, access_line.id, default={'group_id': target_group.id})
|
||||
self._logger.debug("Copied access rights from temporary sharing group to group %s", target_group)
|
||||
_logger.debug("Copied access rights from temporary sharing group to group %s", target_group)
|
||||
|
||||
# finally, delete it after removing its users
|
||||
Groups.write(cr, UID_ROOT, [share_group_id], {'users': [(6,0,[])]})
|
||||
Groups.unlink(cr, UID_ROOT, [share_group_id])
|
||||
self._logger.debug("Deleted temporary sharing group %s", share_group_id)
|
||||
_logger.debug("Deleted temporary sharing group %s", share_group_id)
|
||||
|
||||
def _finish_result_lines(self, cr, uid, wizard_data, share_group_id, context=None):
|
||||
super(share_wizard_portal,self)._finish_result_lines(cr, uid, wizard_data, share_group_id, context=context)
|
||||
|
|
Loading…
Reference in New Issue