for administering it.
M Open-ILS/src/sql/Pg/002.schema.config.sql
A Open-ILS/src/sql/Pg/upgrade/0052.schema.asset_copy_location_order.sql
M Open-ILS/src/sql/Pg/950.data.seed-values.sql
M Open-ILS/examples/fm_IDL.xml
git-svn-id: svn://svn.open-ils.org/ILS/trunk@14585
dcc99617-32d9-48b4-a31d-
7c20da2025e4
</actions>
</permacrud>
</class>
+
+ <class id="acplo" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::copy_location_order" oils_persist:tablename="asset.copy_location_order" reporter:label="Copy/Shelving Location Order">
+ <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_order_id_seq">
+ <field reporter:label="Location Order ID" name="id" reporter:datatype="id"/>
+ <field reporter:label="Location ID" name="location" reporter:datatype="link"/>
+ <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit"/>
+ <field reporter:label="Position" name="position" reporter:datatype="int"/>
+ </fields>
+ <links>
+ <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
+ <link field="org" reltype="has_a" key="id" map="" class="aou"/>
+ </links>
+ <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
+ <actions>
+ <create permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
+ <retrieve/>
+ <update permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
+ <delete permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
+ </actions>
+ </permacrud>
+ </class>
+
<class id="svr" controller="open-ils.cstore" oils_obj:fieldmapper="serial::virtual_record" oils_persist:virtual="true" reporter:label="Serial Virtual Record">
<fields>
<field name="id" oils_persist:virtual="true" />
install_date TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW()
);
-INSERT INTO config.upgrade_log (version) VALUES ('0051'); -- berick
+INSERT INTO config.upgrade_log (version) VALUES ('0052'); -- Scott McKellar
CREATE TABLE config.bib_source (
(346,'UPDATE_BILL_NOTE', oils_i18n_gettext(346,'Allows staff to edit the note for a bill on a transaction', 'ppl', 'description')),
(347,'UPDATE_PAYMENT_NOTE', oils_i18n_gettext(347,'Allows staff to edit the note for a payment on a transaction', 'ppl', 'description')),
(348, 'UPDATE_RECORD', oils_i18n_gettext(348, 'Allow a user to update and undelete records.', 'ppl', 'description')),
- (349, 'UPDATE_PATRON_CLAIM_NEVER_CHECKED_OUT_COUNT', oils_i18n_gettext(349,'Allows staff to manually change a patron''s claims never checkout out count', 'ppl', 'description'));
+ (349, 'UPDATE_PATRON_CLAIM_NEVER_CHECKED_OUT_COUNT', oils_i18n_gettext(349,'Allows staff to manually change a patron''s claims never checkout out count', 'ppl', 'description')),
+ (350, 'ADMIN_COPY_LOCATION_ORDER', oils_i18n_gettext(350, 'Allow a user to create/view/update/delete a copy location order', 'ppl', 'description'));
SELECT SETVAL('permission.perm_list_id_seq'::TEXT, 1000);
--- /dev/null
+INSERT INTO config.upgrade_log (version) VALUES ('0052');
+
+CREATE TABLE asset.copy_location_order
+(
+ id SERIAL PRIMARY KEY,
+ location INT NOT NULL
+ REFERENCES asset.copy_location
+ ON DELETE CASCADE
+ DEFERRABLE INITIALLY DEFERRED,
+ org INT NOT NULL
+ REFERENCES actor.org_unit
+ ON DELETE CASCADE
+ DEFERRABLE INITIALLY DEFERRED,
+ position INT NOT NULL DEFAULT 0,
+ CONSTRAINT acplo_once_per_org UNIQUE ( location, org )
+);
+
+INSERT INTO permission.perm_list VALUES
+(350, 'ADMIN_COPY_LOCATION_ORDER', oils_i18n_gettext(350, 'Allow a user to create/view/update/delete a copy location order', 'ppl', 'description'));
+
+COMMIT;