Skip to content

Commit

Permalink
Deactivate set_record_owner calls on update => must be set_realm_entity
Browse files Browse the repository at this point in the history
if at all.
  • Loading branch information
nursix committed Oct 3, 2012
1 parent 63a203c commit 93e7a5e
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion VERSION
@@ -1 +1 @@
vita-0.5.5-devel-1825-gf282c4c (2012-10-03 08:10:38)
vita-0.5.5-devel-1826-g63a203c (2012-10-03 08:10:04)
2 changes: 1 addition & 1 deletion modules/eden/hrm.py
Expand Up @@ -3253,7 +3253,7 @@ 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.s3_set_record_owner(htable, record, force_update=True)
#auth.set_component_realm_entity(htable, vars,
#update_components = ["presence"])

Expand Down
2 changes: 1 addition & 1 deletion modules/eden/inv.py
Expand Up @@ -341,7 +341,7 @@ 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.s3_set_record_owner(wtable, vars, force_update=True)
#auth.set_component_realm_entity(wtable, vars,
#update_components = ["contact_emergency",
#"physical_description",
Expand Down
2 changes: 1 addition & 1 deletion modules/eden/member.py
Expand Up @@ -338,7 +338,7 @@ 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.s3_set_record_owner(mtable, record, force_update=True)
#auth.set_component_realm_entity(mtable, record)

# realm_entity for the pr_person record
Expand Down
2 changes: 1 addition & 1 deletion modules/eden/org.py
Expand Up @@ -1980,7 +1980,7 @@ 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.s3_set_record_owner(otable, vars, force_update=True)
#auth.set_component_realm_entity(otable, vars,
#update_components = ["contact_emergency",
#"physical_description",
Expand Down
12 changes: 6 additions & 6 deletions modules/eden/supply.py
Expand Up @@ -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,
Expand All @@ -192,7 +192,7 @@ def model(self):

# Catalog Items as component of Catalogs
add_component("supply_catalog_item", supply_catalog="catalog_id")

# =====================================================================
# Item Category
#
Expand Down Expand Up @@ -276,7 +276,7 @@ def model(self):
'FieldResource':'item_category',
})
})''')


# Categories as component of Categories
add_component("supply_item_category",
Expand Down Expand Up @@ -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,
Expand All @@ -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
Expand Down

0 comments on commit 93e7a5e

Please sign in to comment.