add view saleTracking and ACL for news models

This commit is contained in:
Bernat 2018-06-21 07:27:17 +02:00
parent 101d8875a9
commit 7f8ceb6d37
2 changed files with 18 additions and 0 deletions

View File

@ -0,0 +1,3 @@
INSERT INTO `salix`.`ACL` (`id`, `model`, `property`, `accessType`, `permission`, `principalType`, `principalId`) VALUES ('85', 'SaleTracking', '*', 'READ', 'ALLOW', 'ROLE', 'employee');
INSERT INTO `salix`.`ACL` (`id`, `model`, `property`, `accessType`, `permission`, `principalType`, `principalId`) VALUES ('86', 'Order', '*', '*', 'ALLOW', 'ROLE', 'employee');
INSERT INTO `salix`.`ACL` (`id`, `model`, `property`, `accessType`, `permission`, `principalType`, `principalId`) VALUES ('87', 'OrderRow', '*', '*', 'ALLOW', 'ROLE', 'employee');

View File

@ -0,0 +1,15 @@
CREATE
ALGORITHM = UNDEFINED
DEFINER = `root`@`%`
SQL SECURITY DEFINER
VIEW `saleTracking` AS
SELECT
`m`.`Id_Movimiento` AS `saleFk`,
`m`.`valor` AS `isChecked`,
`m`.`odbc_date` AS `created`,
`m`.`original_quantity` AS `originalQuantity`,
`m`.`Id_Trabajador` AS `workerFk`,
`m`.`Id_Accion` AS `actionFk`,
`m`.`Id_Movimiento_mark` AS `id`
FROM
`vn2008`.`Movimientos_mark` `m`