Permalink
Browse files

Merge branch 'master' of git://github.com/nursix/eden

  • Loading branch information...
flavour committed Oct 3, 2012
2 parents 5f65b97 + 93e7a5e commit 2a41f738f1846e451e06b384ea6f15c430e4ea51
Showing with 118 additions and 118 deletions.
  1. +4 −4 modules/eden/asset.py
  2. +9 −9 modules/eden/hrm.py
  3. +20 −20 modules/eden/inv.py
  4. +5 −5 modules/eden/member.py
  5. +22 −22 modules/eden/org.py
  6. +14 −14 modules/eden/project.py
  7. +6 −6 modules/eden/supply.py
  8. +38 −38 modules/s3/s3aaa.py
View
@@ -563,11 +563,11 @@ def asset_onaccept(form):
vars = form.vars
atable = db.asset_asset
- # Update asset realm_entity and components' realm_entity
+ # Update asset realm_entity and components' realm_entity
auth.set_realm_entity(atable, vars, force_update=True)
- auth.set_component_realm_entity(atable, vars,
- update_components = ["log", "presence"]
- )
+ #auth.set_component_realm_entity(atable, vars,
+ #update_components = ["log", "presence"]
+ #)
site_id = vars.get("site_id", None)
if site_id:
View
@@ -1151,7 +1151,7 @@ def model(self):
super_link = self.super_link
root_org = auth.root_org()
-
+
group = current.request.get_vars.get("group", None)
# ---------------------------------------------------------------------
@@ -3236,7 +3236,7 @@ def hrm_human_resource_onaccept(form):
s3db = current.s3db
auth = current.auth
setting = current.deployment_settings
-
+
htable = db.hrm_human_resource
record = db(htable.id == id).select(htable.id,
htable.type,
@@ -3253,9 +3253,9 @@ def hrm_human_resource_onaccept(form):
# Affiliation, record ownership and component ownership
s3db.pr_update_affiliations(htable, record)
- auth.s3_set_record_owner(htable, record, force_update=True)
- auth.set_component_realm_entity(htable, vars,
- update_components = ["presence"])
+ #auth.s3_set_record_owner(htable, record, force_update=True)
+ #auth.set_component_realm_entity(htable, vars,
+ #update_components = ["presence"])
# realm_entity for the pr_person record
ptable = s3db.pr_person
@@ -3266,12 +3266,12 @@ def hrm_human_resource_onaccept(form):
organisation_id = record.organisation_id
entity = s3db.pr_get_pe_id("org_organisation", organisation_id)
if entity:
- auth.set_realm_entity(ptable, person,
+ auth.set_realm_entity(ptable, person,
entity = entity,
force_update = True)
- auth.set_component_realm_entity(ptable, person,
- entity = entity,
- update_components = ["presence"])
+ #auth.set_component_realm_entity(ptable, person,
+ #entity = entity,
+ #update_components = ["presence"])
site_id = record.site_id
site_contact = record.site_contact
View
@@ -330,7 +330,7 @@ def model(self):
# -------------------------------------------------------------------------
@staticmethod
def inv_warehouse_onaccept(form):
- """
+ """
* Update Affiliation and Realms
"""
@@ -341,25 +341,25 @@ def inv_warehouse_onaccept(form):
# Affiliation, record ownership and component ownership
s3db.pr_update_affiliations(wtable, vars)
- auth.s3_set_record_owner(wtable, vars, force_update=True)
- auth.set_component_realm_entity(wtable, vars,
- update_components = ["contact_emergency",
- "physical_description",
- "config",
- "image",
- "req",
- "send",
- "human_resource_site",
- "note",
- "contact",
- "role",
- "asset",
- "commit",
- "inv_item",
- "document",
- "recv",
- "address",
- ])
+ #auth.s3_set_record_owner(wtable, vars, force_update=True)
+ #auth.set_component_realm_entity(wtable, vars,
+ #update_components = ["contact_emergency",
+ #"physical_description",
+ #"config",
+ #"image",
+ #"req",
+ #"send",
+ #"human_resource_site",
+ #"note",
+ #"contact",
+ #"role",
+ #"asset",
+ #"commit",
+ #"inv_item",
+ #"document",
+ #"recv",
+ #"address",
+ #])
# ---------------------------------------------------------------------
@staticmethod
View
@@ -338,9 +338,9 @@ def member_onaccept(form):
# Affiliation, record ownership and component ownership
s3db.pr_update_affiliations(mtable, record)
- auth.s3_set_record_owner(mtable, record, force_update=True)
- auth.set_component_realm_entity(mtable, record)
-
+ #auth.s3_set_record_owner(mtable, record, force_update=True)
+ #auth.set_component_realm_entity(mtable, record)
+
# realm_entity for the pr_person record
person_id = record.person_id
person = Storage(id = person_id)
@@ -349,10 +349,10 @@ def member_onaccept(form):
organisation_id = record.organisation_id
entity = s3db.pr_get_pe_id("org_organisation", organisation_id)
if entity:
- auth.set_realm_entity(ptable, person,
+ auth.set_realm_entity(ptable, person,
entity = entity,
force_update = True)
- #auth.set_component_realm_entity(ptable, person,
+ #auth.set_component_realm_entity(ptable, person,
# entity = entity,
# update_components = [])
View
@@ -1984,9 +1984,9 @@ def org_office_represent(id, row=None):
# ---------------------------------------------------------------------
@staticmethod
def org_office_onaccept(form):
- """
+ """
* Update Affiliation and Realms
- * Process injected fields
+ * Process injected fields
"""
auth = current.auth
@@ -1996,25 +1996,25 @@ def org_office_onaccept(form):
# Affiliation, record ownership and component ownership
s3db.pr_update_affiliations(otable, vars)
- auth.s3_set_record_owner(otable, vars, force_update=True)
- auth.set_component_realm_entity(otable, vars,
- update_components = ["contact_emergency",
- "physical_description",
- "config",
- "image",
- "req",
- "send",
- "human_resource_site",
- "note",
- "contact",
- "role",
- "asset",
- "commit",
- "inv_item",
- "document",
- "recv",
- "address",
- ])
+ #auth.s3_set_record_owner(otable, vars, force_update=True)
+ #auth.set_component_realm_entity(otable, vars,
+ #update_components = ["contact_emergency",
+ #"physical_description",
+ #"config",
+ #"image",
+ #"req",
+ #"send",
+ #"human_resource_site",
+ #"note",
+ #"contact",
+ #"role",
+ #"asset",
+ #"commit",
+ #"inv_item",
+ #"document",
+ #"recv",
+ #"address",
+ #])
if current.deployment_settings.get_org_summary():
@@ -2033,7 +2033,7 @@ def org_office_onaccept(form):
international_staff = vars.international_staff
else:
international_staff = None
-
+
if existing:
db(query).update(national_staff=national_staff,
international_staff=international_staff
View
@@ -751,21 +751,21 @@ def project_project_onaccept(form):
ptable = db.project_project
otable = db.project_organisation
vars = form.vars
- # Update asset realm_entity and components' realm_entity
+ # Update asset realm_entity and components' realm_entity
auth.set_realm_entity(ptable, vars, force_update=True)
- auth.set_component_realm_entity(ptable, vars,
- update_components = ["human_resource",
- "task",
- "organisation",
- "activity",
- "annual_budget",
- "beneficiary",
- "location",
- "milestone",
- "theme_percentage",
- "document",
- "image",
- ])
+ #auth.set_component_realm_entity(ptable, vars,
+ #update_components = ["human_resource",
+ #"task",
+ #"organisation",
+ #"activity",
+ #"annual_budget",
+ #"beneficiary",
+ #"location",
+ #"milestone",
+ #"theme_percentage",
+ #"document",
+ #"image",
+ #])
lead_role = current.deployment_settings.get_project_organisation_lead_role()
View
@@ -168,7 +168,7 @@ def model(self):
sortby="name",
requires = IS_NULL_OR(
IS_ONE_OF( # Restrict to catalogs the user can update
- db(current.auth.s3_accessible_query("update", table)),
+ db(current.auth.s3_accessible_query("update", table)),
"supply_catalog.id",
"%(name)s",
sort=True,
@@ -192,7 +192,7 @@ def model(self):
# Catalog Items as component of Catalogs
add_component("supply_catalog_item", supply_catalog="catalog_id")
-
+
# =====================================================================
# Item Category
#
@@ -276,7 +276,7 @@ def model(self):
'FieldResource':'item_category',
})
})''')
-
+
# Categories as component of Categories
add_component("supply_item_category",
@@ -1152,13 +1152,13 @@ def supply_item_onaccept(form):
catalog_id = vars.catalog_id
catalog_item_id = None
-
+
citable = db.supply_catalog_item
query = (citable.item_id == item_id) & \
(citable.deleted == False )
rows = db(citable).select(citable.id)
if not len(rows):
- # Create supply_catalog_item
+ # Create supply_catalog_item
catalog_item_id = \
citable.insert(catalog_id = catalog_id,
item_category_id = vars.item_category_id,
@@ -1173,7 +1173,7 @@ def supply_item_onaccept(form):
item_category_id = vars.item_category_id,
item_id = item_id
)
- auth.s3_set_record_owner(citable, catalog_item_id, force_update=True)
+ #auth.s3_set_record_owner(citable, catalog_item_id, force_update=True)
# Update UM
um = vars.um or db.supply_item.um.default
Oops, something went wrong.

0 comments on commit 2a41f73

Please sign in to comment.