-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
35 changed files
with
1,332 additions
and
512 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
ALTER TABLE `vindula_myvindulaDB`.`vin_contentcore_fields` ADD COLUMN `flag_float_left` TINYINT(1) DEFAULT False AFTER `forms_id`; | ||
|
||
-- ALTER TABLE `vindula_myvindulaDB`.`vin_contentcore_fields` ADD COLUMN `flag_float_left` TINYINT(1) DEFAULT False AFTER `forms_id`; | ||
ALTER TABLE `vindula_myvindulaDB`.`vin_contentcore_log` ADD COLUMN `username` VARCHAR(100) DEFAULT NULL AFTER `valor_new`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
-- MySQL dump 10.13 Distrib 5.5.24, for debian-linux-gnu (x86_64) | ||
-- | ||
-- Host: localhost Database: vindula_myvindulaDB_homolog | ||
-- ------------------------------------------------------ | ||
-- Server version 5.5.24-0ubuntu0.12.04.1 | ||
|
||
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; | ||
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; | ||
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; | ||
/*!40101 SET NAMES utf8 */; | ||
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; | ||
/*!40103 SET TIME_ZONE='+00:00' */; | ||
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; | ||
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; | ||
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; | ||
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; | ||
|
||
-- | ||
-- Table structure for table `vin_myvindula_holerite02` | ||
-- | ||
|
||
USE `vindula_myvindulaDB`; | ||
|
||
DROP TABLE IF EXISTS `vin_myvindula_holerite02`; | ||
/*!40101 SET @saved_cs_client = @@character_set_client */; | ||
/*!40101 SET character_set_client = utf8 */; | ||
CREATE TABLE `vin_myvindula_holerite02` ( | ||
`id` int(100) NOT NULL AUTO_INCREMENT, | ||
`empresa` varchar(42) DEFAULT NULL, | ||
`cnpj_empresa` varchar(20) DEFAULT NULL, | ||
`competencia` varchar(7) DEFAULT NULL, | ||
`matricula` varchar(11) DEFAULT NULL, | ||
`nome` varchar(42) DEFAULT NULL, | ||
`data_admissao` varchar(11) DEFAULT NULL, | ||
`cargo` varchar(26) DEFAULT NULL, | ||
`setor` varchar(26) DEFAULT NULL, | ||
`carteira_trabalho` varchar(17) DEFAULT NULL, | ||
`secao` varchar(6) DEFAULT NULL, | ||
`dep_ir` varchar(3) DEFAULT NULL, | ||
`dep_sf` varchar(3) DEFAULT NULL, | ||
`cpf` varchar(15) DEFAULT NULL, | ||
`indentidade` varchar(21) DEFAULT NULL, | ||
`pis` varchar(15) DEFAULT NULL, | ||
`salario_base` varchar(11) DEFAULT NULL, | ||
`cod_pagamento` varchar(3) DEFAULT NULL, | ||
`banco_pag` varchar(26) DEFAULT NULL, | ||
`agencia` varchar(16) DEFAULT NULL, | ||
`conta_corrente` varchar(16) DEFAULT NULL, | ||
`date_creation` datetime NOT NULL, | ||
`base_fgts` varchar(11) DEFAULT NULL, | ||
`base_Inss` varchar(11) DEFAULT NULL, | ||
`base_irrf` varchar(11) DEFAULT NULL, | ||
`salario_contribuicao` varchar(11) DEFAULT NULL, | ||
`total_proventos` varchar(11) DEFAULT NULL, | ||
`total_desconto` varchar(11) DEFAULT NULL, | ||
`fgts_mes` varchar(11) DEFAULT NULL, | ||
`valor_liquido` varchar(11) DEFAULT NULL, | ||
`observacao` varchar(100) DEFAULT NULL, | ||
PRIMARY KEY (`id`) | ||
) ENGINE=InnoDB AUTO_INCREMENT=1227 DEFAULT CHARSET=latin1; | ||
/*!40101 SET character_set_client = @saved_cs_client */; | ||
|
||
-- | ||
-- Table structure for table `vin_myvindula_descricao_holerite02` | ||
-- | ||
|
||
DROP TABLE IF EXISTS `vin_myvindula_descricao_holerite02`; | ||
/*!40101 SET @saved_cs_client = @@character_set_client */; | ||
/*!40101 SET character_set_client = utf8 */; | ||
CREATE TABLE `vin_myvindula_descricao_holerite02` ( | ||
`id` int(11) NOT NULL AUTO_INCREMENT, | ||
`codigo` varchar(4) DEFAULT NULL, | ||
`descricao` varchar(31) DEFAULT NULL, | ||
`valor` varchar(11) DEFAULT NULL, | ||
`status` varchar(2) DEFAULT NULL, | ||
`referencial` varchar(10) DEFAULT NULL, | ||
`vin_myvindula_holerite02_id` int(100) NOT NULL, | ||
PRIMARY KEY (`id`), | ||
KEY `fk_vin_myvindula_descricao_holerite02_vin_myvindula_holerite021` (`vin_myvindula_holerite02_id`), | ||
CONSTRAINT `fk_vin_myvindula_descricao_holerite02_vin_myvindula_holerite021` FOREIGN KEY (`vin_myvindula_holerite02_id`) REFERENCES `vin_myvindula_holerite02` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION | ||
) ENGINE=InnoDB AUTO_INCREMENT=12464 DEFAULT CHARSET=latin1; | ||
/*!40101 SET character_set_client = @saved_cs_client */; | ||
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; | ||
|
||
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; | ||
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; | ||
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; | ||
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; | ||
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; | ||
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; | ||
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; | ||
|
||
-- Dump completed on 2014-02-19 21:08:42 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ALTER TABLE `vindula_myvindulaDB`.`vin_contentcore_forms` ADD COLUMN `uid_form` VARCHAR(255) DEFAULT NULL AFTER `description_form`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# -*- coding: utf-8 -*- | ||
from five import grok | ||
|
||
from vindula.contentcore.formulario import IFormularioPadrao | ||
|
||
from vindula.contentcore.models.fields import ModelsFormFields | ||
from vindula.contentcore.models.form_values import ModelsFormValues | ||
|
||
grok.templatedir('views_templates') | ||
|
||
class VindulaAjaxReferenceView(grok.View): | ||
grok.context(IFormularioPadrao) | ||
grok.require('zope2.View') | ||
grok.name('ajax-reference') | ||
|
||
|
||
|
||
def update(self): | ||
form = self.request.form | ||
instance = 0 | ||
|
||
formulario = form.get('form','0') | ||
field = form.get('field','') | ||
self.name_field = field | ||
value = form.get('value','') | ||
|
||
self.formulario = formulario | ||
self.campos = ModelsFormFields().get_Fields_ByIdForm(int(formulario)) | ||
|
||
campo_busca = ModelsFormValues().store.find(ModelsFormValues, ModelsFormValues.fields==unicode(field), | ||
ModelsFormValues.forms_id==int(formulario), | ||
ModelsFormValues.value==unicode(value) | ||
) | ||
if campo_busca.count(): | ||
instance = campo_busca[0].instance_id | ||
|
||
self.valores = ModelsFormValues().get_FormValues_byForm_and_Instance(int(formulario),instance) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# -*- coding: utf-8 -*- | ||
from five import grok | ||
from zope.interface import Interface | ||
from Products.CMFCore.utils import getToolByName | ||
from vindula.contentcore.base import BaseFunc | ||
|
||
from vindula.contentcore.browser.views import VindulaMyListPedidoView, VindulaListPedidosView | ||
|
||
from Products.CMFCore.interfaces import ISiteRoot | ||
from datetime import datetime , timedelta | ||
from dateutil.relativedelta import relativedelta | ||
|
||
# Views | ||
class BuscaFormulario(object): | ||
|
||
def list_formularios(self): | ||
portal_catalog = getToolByName(self.context, 'portal_catalog') | ||
portal = self.context.portal_url.getPortalObject() | ||
itens = portal_catalog(**{'portal_type':['vindula.contentcore.formulariobasico'], | ||
'path':{'query':'/'.join(portal.getPhysicalPath()), 'depth': 99} | ||
}) | ||
return itens | ||
|
||
def get_data_final(self): | ||
date = datetime.now() + timedelta(days=1) | ||
return date.strftime('%d/%m/%Y') | ||
|
||
def get_data_inicial(self): | ||
date = datetime.now() - relativedelta(months=1) | ||
return date.strftime('%d/%m/%Y') | ||
|
||
class MinhasSolicitacoesView(grok.View,BuscaFormulario): | ||
grok.context(ISiteRoot) | ||
grok.require('zope2.View') | ||
grok.name('minhas-solicitacoes') | ||
|
||
# def update(self,form_id=None): | ||
# setattr(self, 'form_id', form_id) | ||
# super(MinhasSolicitacoesView,self).update() | ||
|
||
class GerenciarSolicitacoesView(grok.View,BuscaFormulario): | ||
grok.context(ISiteRoot) | ||
grok.require('zope2.View') | ||
grok.name('gerenciar-solicitacoes') | ||
|
||
# def update(self,form_id=None): | ||
# setattr(self, 'form_id', form_id) | ||
# super(GerenciarSolicitacoesView,self).update() |
Oops, something went wrong.