Merge lp:~inddiana/diana-addons/supply_control_update-gudanthony7 into lp:diana-addons

Proposed by Anthony on 2018-12-06
Status: Needs review
Proposed branch: lp:~inddiana/diana-addons/supply_control_update-gudanthony7
Merge into: lp:diana-addons
Diff against target: 1612 lines (+1176/-274)
16 files modified
supply_control/i18n/es_VE.po (+660/-264)
supply_control/model/diana_supply_lines.py (+4/-2)
supply_control/model/remote_print.py (+2/-2)
supply_control/view/diana_supply_view.xml (+14/-6)
supply_control_update/__init__.py (+2/-0)
supply_control_update/__openerp__.py (+26/-0)
supply_control_update/i18n/es_VE.po (+154/-0)
supply_control_update/models/__init__.py (+4/-0)
supply_control_update/models/hr_employee.py (+54/-0)
supply_control_update/models/lock_assig.py (+103/-0)
supply_control_update/models/supply_control.py (+55/-0)
supply_control_update/security/ir.model.access.csv (+10/-0)
supply_control_update/security/supply_security.xml (+12/-0)
supply_control_update/views/diana_supply_views.xml (+24/-0)
supply_control_update/views/hr_employee_views.xml (+50/-0)
supply_control_update/views/lock_assig_views.xml (+2/-0)
To merge this branch: bzr merge lp:~inddiana/diana-addons/supply_control_update-gudanthony7
Reviewer Review Type Date Requested Status
Anthony Pending
Review via email: mp+360185@code.launchpad.net

Commit message

Se realiza un mejora de la vista en la seccion de tipo de asignaciones en supply_control y se crea un modulo llamado supply_control_update el cual incluye nuevas funciones de validacion

To post a comment you must log in.

Unmerged revisions

61. By Anthony on 2018-12-05

Actualizacion del modulo supply_control y la creacion de un modulo que hereda del mismo e implementa nuevas funcionalidades.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'supply_control/i18n/es_VE.po' (properties changed: +x to -x)
2--- supply_control/i18n/es_VE.po 2017-07-20 15:21:08 +0000
3+++ supply_control/i18n/es_VE.po 2018-12-06 12:31:45 +0000
4@@ -1,324 +1,720 @@
5 # Translation of OpenERP Server.
6 # This file contains the translation of the following modules:
7-# * sisb_supply_control
8+# * supply_control
9 #
10 msgid ""
11 msgstr ""
12 "Project-Id-Version: OpenERP Server 6.0.4\n"
13 "Report-Msgid-Bugs-To: support@openerp.com\n"
14-"POT-Creation-Date: 2012-09-27 13:55+0000\n"
15-"PO-Revision-Date: 2012-09-27 09:45-0400\n"
16-"Last-Translator: Angel Guadarrama <guadarramaangel@gmail.com>\n"
17+"POT-Creation-Date: 2018-12-05 14:25+0000\n"
18+"PO-Revision-Date: 2018-12-05 14:25+0000\n"
19+"Last-Translator: <>\n"
20 "Language-Team: \n"
21 "MIME-Version: 1.0\n"
22 "Content-Type: text/plain; charset=UTF-8\n"
23-"Content-Transfer-Encoding: 8bit\n"
24+"Content-Transfer-Encoding: \n"
25 "Plural-Forms: \n"
26
27-#. module: sisb_supply_control
28-#: code:addons/sisb_supply_control/model/diana_supply.py:206
29-#, python-format
30-msgid "Connectivity problem. Check parameters!"
31-msgstr "Problemas de conectividad. Chequee los parámetros!"
32-
33-#. module: sisb_supply_control
34+#. module: supply_control
35+#: report:sede.suministro:0
36+msgid "FIRMA"
37+msgstr "FIRMA"
38+
39+#. module: supply_control
40+#: field:diana.supply.asign.type,days_old:0
41+msgid "Dias de Antiguedad"
42+msgstr "Dias de Antiguedad"
43+
44+#. module: supply_control
45+#: model:ir.ui.menu,name:supply_control.menu_supply_printer
46+msgid "Configuración de Impresoras"
47+msgstr "Configuración de Impresoras"
48+
49+#. module: supply_control
50+#: view:diana.supply.printers.wizard:0
51+msgid "¿Ticket was printed correctly?"
52+msgstr "¿El ticket se imprimió correctamente?"
53+
54+#. module: supply_control
55+#: view:diana.supply.printer:0
56+msgid "Puerto XMLRPC"
57+msgstr "Puerto XMLRPC"
58+
59+#. module: supply_control
60+#: field:diana.supply.asign,detail:0
61+msgid "Incluye detalle"
62+msgstr "Incluye detalle"
63+
64+#. module: supply_control
65+#: report:sede.suministro:0
66+msgid "/ Fecha de Impresion:"
67+msgstr "/ Fecha de Impresion:"
68+
69+#. module: supply_control
70+#: view:diana.supply.asign:0
71+msgid "Crear Asignaciones"
72+msgstr "Crear Asignaciones"
73+
74+#. module: supply_control
75+#: field:diana.supply.asign.type,accumulate:0
76+msgid "Es Acumulativo?"
77+msgstr "Es Acumulativo?"
78+
79+#. module: supply_control
80+#: report:report.sede.suministros:0
81+msgid "Página:"
82+msgstr "Página:"
83+
84+#. module: supply_control
85+#: report:report.sede.suministros:0
86+msgid "Fecha de Entrega"
87+msgstr "Fecha de Entrega"
88+
89+#. module: supply_control
90+#: report:report.sede.suministros:0
91+msgid ","
92+msgstr ","
93+
94+#. module: supply_control
95+#: report:report.sede.suministros:0
96+msgid "Impreso"
97+msgstr "Impreso"
98+
99+#. module: supply_control
100 #: view:diana.supply.lines:0
101-#: field:diana.supply.lines,delivered:0
102-#: selection:diana.supply.lines,state:0
103-msgid "Delivered"
104-msgstr "Entregado"
105-
106-#. module: sisb_supply_control
107-#: code:addons/sisb_supply_control/model/diana_supply.py:79
108-#: code:addons/sisb_supply_control/model/diana_supply.py:115
109-#, python-format
110-msgid "The period does not match with the current month!"
111-msgstr "El período no concuerda con el mes corriente!"
112-
113-#. module: sisb_supply_control
114-#: view:diana.supply.printers.wizard:0
115-msgid "No"
116-msgstr "No"
117-
118-#. module: sisb_supply_control
119-#: field:diana.supply.printer,machine_pass:0
120-msgid "User pass"
121-msgstr "Contraseña de usuario"
122-
123-#. module: sisb_supply_control
124-#: model:ir.model,name:sisb_supply_control.model_diana_supply_lines
125-msgid "diana.supply.lines"
126-msgstr "diana.supply.lines"
127-
128-#. module: sisb_supply_control
129-#: code:addons/sisb_supply_control/model/diana_supply.py:188
130-#, python-format
131-msgid "The selected supply has expired. Select another."
132-msgstr "El suministro seleccionado ha expirado. Seleccione otro."
133-
134-#. module: sisb_supply_control
135+#: field:diana.supply.lines,sede_id:0
136+#: field:wizard.supply,sede:0
137+msgid "Sede"
138+msgstr "Sede"
139+
140+#. module: supply_control
141+#: model:ir.actions.act_window,name:supply_control.action_diana_supply_asign_tree
142+#: model:ir.ui.menu,name:supply_control.menu_supply_asing
143+msgid "Asignaciones"
144+msgstr "Asignaciones"
145+
146+#. module: supply_control
147+#: field:wizard.supply,mes:0
148+msgid "Mes"
149+msgstr "Mes"
150+
151+#. module: supply_control
152+#: view:diana.supply.asign.type:0
153+msgid "Configuration of users"
154+msgstr "Configuración de usuarios"
155+
156+#. module: supply_control
157+#: view:diana.supply.asign.type:0
158+msgid "Notes"
159+msgstr "Notas"
160+
161+#. module: supply_control
162+#: field:diana.supply.lines,name:0
163+msgid "Supply Reference"
164+msgstr "Referencia de suministro"
165+
166+#. module: supply_control
167+#: model:ir.ui.menu,name:supply_control.menu_diana_supply_control
168+msgid "Control de Asignaciones"
169+msgstr "Control de Asignaciones"
170+
171+#. module: supply_control
172+#: report:report.sede.suministros:0
173+msgid ", quedan"
174+msgstr ", quedan"
175+
176+#. module: supply_control
177+#: model:ir.actions.act_window,name:supply_control.action_diana_supply_printer
178+msgid "Impresoras"
179+msgstr "Impresoras"
180+
181+#. module: supply_control
182+#: view:diana.supply.asign:0
183+msgid "Lista de Empleados"
184+msgstr "Lista de Empleados"
185+
186+#. module: supply_control
187+#: report:report.sede.suministros:0
188+msgid "Trabajador"
189+msgstr "Trabajador"
190+
191+#. module: supply_control
192+#: model:ir.actions.act_window,name:supply_control.action_diana_supply_asign_type_tree
193+#: model:ir.actions.act_window,name:supply_control.action_diana_supply_type_tree
194+msgid "Tipos de Asignación"
195+msgstr "Tipos de Asignación"
196+
197+#. module: supply_control
198+#: selection:diana.supply.asign.type,day_assig_defect:0
199+msgid "Martes"
200+msgstr "Martes"
201+
202+#. module: supply_control
203+#: model:ir.model,name:supply_control.model_diana_supply_asign_detail
204+msgid "Details of asignations"
205+msgstr "Details of asignations"
206+
207+#. module: supply_control
208+#: field:diana.supply.asign,aggregate:0
209+msgid "Nota"
210+msgstr "Nota"
211+
212+#. module: supply_control
213+#: field:diana.supply.asign,print_default:0
214+msgid "Seleccione Impresora"
215+msgstr "Seleccione Impresora"
216+
217+#. module: supply_control
218+#: selection:diana.supply.asign,state:0
219+msgid "Cargado"
220+msgstr "Cargado"
221+
222+#. module: supply_control
223+#: model:ir.ui.menu,name:supply_control.menu_supply_lines
224+msgid "Entregas"
225+msgstr "Entregas"
226+
227+#. module: supply_control
228+#: report:report.sede.suministros:0
229+msgid "suministros en estado Borrador"
230+msgstr "suministros en estado Borrador"
231+
232+#. module: supply_control
233+#: field:diana.supply.asign,detail_ids:0
234+msgid "Detalles"
235+msgstr "Detalles"
236+
237+#. module: supply_control
238 #: field:diana.supply.lines,state:0
239 msgid "State"
240 msgstr "Estado"
241
242-#. module: sisb_supply_control
243-#: view:diana.supply.lines:0
244-#: selection:diana.supply.lines,state:0
245-msgid "Draft"
246-msgstr "Borrador"
247-
248-#. module: sisb_supply_control
249-#: view:diana.supply.printers.wizard:0
250-msgid "¿Ticket was printed correctly?"
251-msgstr "¿El ticket se imprimió correctamente?"
252-
253-#. module: sisb_supply_control
254+#. module: supply_control
255+#: report:report.sede.suministros:0
256+msgid "Fecha de Asignacion"
257+msgstr "Fecha de Asignacion"
258+
259+#. module: supply_control
260+#: field:diana.supply.asign.type,day_assig_defect:0
261+msgid "Dia de asignación por defecto"
262+msgstr "Dia de asignación por defecto"
263+
264+#. module: supply_control
265 #: field:diana.supply.lines,employee_id:0
266-#: model:ir.model,name:sisb_supply_control.model_hr_employee
267 msgid "Employee"
268 msgstr "Empleado"
269
270-#. module: sisb_supply_control
271-#: model:ir.actions.act_window,name:sisb_supply_control.action_diana_supply_line_tree
272-msgid "Diana Supply Lines"
273-msgstr "Lineas de suministros Diana"
274-
275-#. module: sisb_supply_control
276-#: code:addons/sisb_supply_control/model/diana_supply.py:79
277-#: code:addons/sisb_supply_control/model/diana_supply.py:82
278-#: code:addons/sisb_supply_control/model/diana_supply.py:115
279-#: code:addons/sisb_supply_control/model/diana_supply.py:117
280-#: code:addons/sisb_supply_control/model/diana_supply.py:206
281-#, python-format
282-msgid "Alert !"
283-msgstr "Alerta!"
284-
285-#. module: sisb_supply_control
286-#: field:diana.supply.asign,name:0
287-msgid "Asignation Reference"
288-msgstr "Referencia de asignación"
289-
290-#. module: sisb_supply_control
291-#: model:ir.actions.act_window,name:sisb_supply_control.action_diana_supply_printer
292-#: model:ir.ui.menu,name:sisb_supply_control.menu_supply_printer
293-msgid "Printer"
294-msgstr "Impresora"
295-
296-#. module: sisb_supply_control
297-#: field:diana.supply.printer,printer_status:0
298-msgid "Printer Status"
299-msgstr "Estatus de la impresora"
300-
301-#. module: sisb_supply_control
302-#: field:diana.supply.printer,ip_address:0
303-msgid "IP Address"
304-msgstr "Dirección IP"
305-
306-#. module: sisb_supply_control
307-#: view:diana.supply.lines:0
308-msgid "Deliver"
309-msgstr "Entregar"
310-
311-#. module: sisb_supply_control
312-#: model:ir.actions.act_window,name:sisb_supply_control.action_printers_wizard_confirm
313-msgid "Printing Confirmation"
314-msgstr "Confirmación de impresión"
315-
316-#. module: sisb_supply_control
317-#: view:diana.supply.lines:0
318-msgid "Search Supply State"
319-msgstr "Búsqueda por estado de suministros"
320-
321-#. module: sisb_supply_control
322-#: model:ir.actions.report.xml,name:sisb_supply_control.supply_lines_report
323-msgid "Report Latex Supply Lines Sisb"
324-msgstr "Reporte latex de lineas de suministros SISB"
325-
326-#. module: sisb_supply_control
327-#: view:diana.supply.asign:0
328-msgid "Supply Asignation"
329-msgstr "Asignación de suministro"
330-
331-#. module: sisb_supply_control
332+#. module: supply_control
333+#: selection:diana.supply.asign.type,day_assig_defect:0
334+msgid "Lunes"
335+msgstr "Lunes"
336+
337+#. module: supply_control
338+#: field:diana.supply.printer,ssh_port:0
339+msgid "SSH Port"
340+msgstr "Puerto SSh"
341+
342+#. module: supply_control
343+#: report:report.sede.suministros:0
344+msgid "A la fecha"
345+msgstr "A la fecha"
346+
347+#. module: supply_control
348+#: model:ir.model,name:supply_control.model_wizard_print_report_sede
349+msgid "Wizar para imprimir reportes de las lineas de suministros"
350+msgstr "Wizar para imprimir reportes de las lineas de suministros"
351+
352+#. module: supply_control
353+#: field:wizard.supply,type_assig:0
354+msgid "Tipo de Asignacion"
355+msgstr "Tipo de Asignacion"
356+
357+#. module: supply_control
358+#: selection:diana.supply.asign.type,day_assig_defect:0
359+msgid "Jueves"
360+msgstr "Jueves"
361+
362+#. module: supply_control
363+#: model:ir.ui.menu,name:supply_control.supply_configuration
364+msgid "Configuración"
365+msgstr "Configuración"
366+
367+#. module: supply_control
368 #: field:diana.supply.printer,name:0
369 msgid "Printer Name"
370 msgstr "Nombre de impresora"
371
372-#. module: sisb_supply_control
373-#: view:diana.supply.lines:0
374-#: selection:diana.supply.lines,state:0
375-msgid "Expired"
376-msgstr "Expirado"
377-
378-#. module: sisb_supply_control
379-#: constraint:hr.employee:0
380-msgid "Error ! You cannot create recursive Hierarchy of Employees."
381-msgstr "Error ! You cannot create recursive Hierarchy of Employees."
382-
383-#. module: sisb_supply_control
384+#. module: supply_control
385 #: field:diana.supply.lines,expiration_date:0
386 msgid "Expiration Date"
387 msgstr "Fecha de expirado"
388
389-#. module: sisb_supply_control
390-#: code:addons/sisb_supply_control/model/diana_supply.py:231
391-#, python-format
392-msgid "The supply has been changed to draft correctly."
393-msgstr "El suministro ha cambiado a borrador correctamente."
394-
395-#. module: sisb_supply_control
396-#: model:ir.actions.act_window,name:sisb_supply_control.action_diana_supply_asign_tree
397-#: model:ir.ui.menu,name:sisb_supply_control.menu_supply_asing
398-msgid "Assignation"
399-msgstr "Asignación"
400-
401-#. module: sisb_supply_control
402-#: view:diana.supply.asign:0
403-msgid "Employees for supply asignation"
404-msgstr "Empleados para asignación de suministro"
405-
406-#. module: sisb_supply_control
407-#: model:ir.model,name:sisb_supply_control.model_diana_supply_asign
408-msgid "diana.supply.asign"
409-msgstr "diana.supply.asign"
410-
411-#. module: sisb_supply_control
412-#: field:diana.supply.asign,employee_ids:0
413-msgid "Employees"
414-msgstr "Empleados"
415-
416-#. module: sisb_supply_control
417+#. module: supply_control
418 #: view:diana.supply.lines:0
419 msgid "Return to Draft"
420 msgstr "Retornar a borrador"
421
422-#. module: sisb_supply_control
423-#: constraint:hr.employee:0
424-msgid "Error ! You cannot select a department for which the employee is the manager."
425-msgstr "Error ! You cannot select a department for which the employee is the manager."
426-
427-#. module: sisb_supply_control
428-#: code:addons/sisb_supply_control/model/diana_supply.py:82
429-#: code:addons/sisb_supply_control/model/diana_supply.py:117
430-#, python-format
431-msgid "Already assigned this period!"
432-msgstr "Ya ha sido asignado este período"
433-
434-#. module: sisb_supply_control
435-#: view:diana.supply.asign:0
436-#: field:diana.supply.lines,asign_id:0
437-msgid "Asignation"
438+#. module: supply_control
439+#: report:report.sede.suministros:0
440+msgid "/ Fecha de Impresión:"
441+msgstr "/ Fecha de Impresión:"
442+
443+#. module: supply_control
444+#: view:diana.supply.lines:0
445+msgid "Empleado"
446+msgstr "Empleado"
447+
448+#. module: supply_control
449+#: view:diana.supply.asign:0
450+msgid "Cargar Todos"
451+msgstr "Cargar Todos"
452+
453+#. module: supply_control
454+#: view:diana.supply.asign:0
455+#: field:diana.supply.asign.detail,asign_id:0
456+#: view:diana.supply.lines:0
457+msgid "Asignación"
458 msgstr "Asignación"
459
460-#. module: sisb_supply_control
461-#: field:diana.supply.lines,name:0
462-msgid "Supply Reference"
463-msgstr "Referencia de suministro"
464-
465-#. module: sisb_supply_control
466-#: field:diana.supply.printer,ssh_port:0
467-msgid "SSH Port"
468-msgstr "Puerto SSh"
469-
470-#. module: sisb_supply_control
471-#: model:ir.model,name:sisb_supply_control.model_diana_supply_printer
472-msgid "diana.supply.printer"
473-msgstr "diana.supply.printer"
474-
475-#. module: sisb_supply_control
476-#: code:addons/sisb_supply_control/model/diana_supply.py:141
477-#, python-format
478-msgid "Supplies period %s, assigned correctly."
479-msgstr "Los suministros del período %s, asignados correctamente."
480-
481-#. module: sisb_supply_control
482-#: field:diana.supply.printer,upload_dir:0
483-msgid "Remote Directory"
484-msgstr "Directorio remoto"
485-
486-#. module: sisb_supply_control
487-#: view:diana.supply.printer:0
488-msgid "Printer Configuration"
489-msgstr "Configuración de impresoras"
490-
491-#. module: sisb_supply_control
492-#: field:diana.supply.asign,asigned_date:0
493-#: field:diana.supply.lines,asigned_date:0
494-msgid "Asignation Date"
495-msgstr "Fecha de asignación"
496-
497-#. module: sisb_supply_control
498-#: field:diana.supply.lines,print_verify:0
499-msgid "Print verification"
500-msgstr "Verificación de impresión"
501-
502-#. module: sisb_supply_control
503+#. module: supply_control
504+#: report:sede.suministro:0
505+msgid "Valencia,"
506+msgstr "Valencia,"
507+
508+#. module: supply_control
509+#: field:diana.supply.printer,machine_user:0
510+msgid "User Machine"
511+msgstr "Usuario de la maquina"
512+
513+#. module: supply_control
514+#: report:report.sede.suministros:0
515+msgid "RESUMEN GENERAL"
516+msgstr "RESUMEN GENERAL"
517+
518+#. module: supply_control
519+#: field:diana.supply.lines,despachador_id:0
520+msgid "Entregado por:"
521+msgstr "Entregado por:"
522+
523+#. module: supply_control
524 #: field:diana.supply.lines,delivery_date:0
525 msgid "Delivery Date"
526 msgstr "Fecha de entrega"
527
528-#. module: sisb_supply_control
529-#: field:diana.supply.printer,file_name:0
530-msgid "File Name"
531-msgstr "Nombre del archivo"
532+#. module: supply_control
533+#: model:ir.model,name:supply_control.model_wizard_supply
534+msgid "Wizar para imprimir reportes de suministros"
535+msgstr "Wizar para imprimir reportes de suministros"
536
537-#. module: sisb_supply_control
538+#. module: supply_control
539 #: field:diana.supply.asign,lines_ids:0
540-#: view:diana.supply.lines:0
541-#: field:hr.employee,diana_supply_asign_id:0
542-#: field:hr.employee,diana_supply_lines_id:0
543-#: model:ir.ui.menu,name:sisb_supply_control.menu_supply_lines
544 msgid "Supply Lines"
545 msgstr "Lineas de suministro"
546
547-#. module: sisb_supply_control
548-#: field:diana.supply.asign,period_id:0
549-#: field:diana.supply.lines,period_id:0
550-msgid "Period"
551-msgstr "Período"
552-
553-#. module: sisb_supply_control
554-#: model:ir.ui.menu,name:sisb_supply_control.menu_diana_supply_control
555-msgid "Diana Supply Control"
556-msgstr "Control de suministros Diana"
557-
558-#. module: sisb_supply_control
559-#: view:diana.supply.printers.wizard:0
560-msgid "Yes"
561-msgstr "Si"
562-
563-#. module: sisb_supply_control
564-#: view:diana.supply.asign:0
565-msgid "_Cancel"
566-msgstr "_Cancelar"
567-
568-#. module: sisb_supply_control
569-#: view:diana.supply.asign:0
570-msgid "Asign Supply"
571-msgstr "Asignar suministro"
572-
573-#. module: sisb_supply_control
574-#: model:ir.model,name:sisb_supply_control.model_diana_supply_printers_wizard
575+#. module: supply_control
576+#: view:diana.supply.lines:0
577+msgid "Despachado Por"
578+msgstr "Despachado Por"
579+
580+#. module: supply_control
581+#: model:ir.model,name:supply_control.model_diana_supply_printers_wizard
582 msgid "diana.supply.printers.wizard"
583 msgstr "diana.supply.printers.wizard"
584
585-#. module: sisb_supply_control
586+#. module: supply_control
587 #: field:diana.supply.printer,printer_port:0
588 msgid "Printer Port"
589 msgstr "Puerto de impresora"
590
591-#. module: sisb_supply_control
592+#. module: supply_control
593 #: field:diana.supply.lines,employee_code:0
594 msgid "Employee Code"
595 msgstr "Código de empleado"
596
597-#. module: sisb_supply_control
598+#. module: supply_control
599 #: field:diana.supply.printer,local_dir:0
600 msgid "Local Directory"
601 msgstr "Directorio local"
602
603-#. module: sisb_supply_control
604-#: field:diana.supply.printer,machine_user:0
605-msgid "User Machine"
606-msgstr "Usuario de la maquina"
607+#. module: supply_control
608+#: report:sede.suministro:0
609+msgid "ENTREGA DE SUMINISTRO"
610+msgstr "ENTREGA DE SUMINISTRO"
611+
612+#. module: supply_control
613+#: view:diana.supply.asign:0
614+msgid "Detalles de la Asignación"
615+msgstr "Detalles de la Asignación"
616+
617+#. module: supply_control
618+#: view:diana.supply.printers.wizard:0
619+msgid "No"
620+msgstr "No"
621+
622+#. module: supply_control
623+#: view:diana.supply.asign:0
624+msgid "¿Confirma que desea devolver el proceso?"
625+msgstr "¿Confirma que desea devolver el proceso?"
626+
627+#. module: supply_control
628+#: model:ir.model,name:supply_control.model_diana_supply_printer
629+msgid "diana.supply.printer"
630+msgstr "diana.supply.printer"
631+
632+#. module: supply_control
633+#: report:report.sede.suministros:0
634+msgid "Despachado por"
635+msgstr "Despachado por"
636+
637+#. module: supply_control
638+#: report:report.sede.suministros:0
639+msgid "INFORME DE ASIGNACION DE"
640+msgstr "INFORME DE ASIGNACION DE"
641+
642+#. module: supply_control
643+#: view:diana.supply.lines:0
644+#: selection:diana.supply.lines,state:0
645+msgid "Draft"
646+msgstr "Borrador"
647+
648+#. module: supply_control
649+#: report:report.sede.suministros:0
650+msgid ", Estado:"
651+msgstr ", Estado:"
652+
653+#. module: supply_control
654+#: field:diana.supply.printer,printer_status:0
655+msgid "Status"
656+msgstr "Status"
657+
658+#. module: supply_control
659+#: model:ir.actions.act_window,name:supply_control.action_w
660+msgid "Informe de Asignaciones"
661+msgstr "Informe de Asignaciones"
662+
663+#. module: supply_control
664+#: field:diana.supply.asign,note:0
665+msgid "Agregar Nota"
666+msgstr "Agregar Nota"
667+
668+#. module: supply_control
669+#: field:diana.supply.lines,asigned_type:0
670+msgid "Tipo de asignación"
671+msgstr "Tipo de asignación"
672+
673+#. module: supply_control
674+#: report:report.sede.suministros:0
675+#: report:sede.suministro:0
676+msgid "SISB /"
677+msgstr "SISB /"
678+
679+#. module: supply_control
680+#: selection:diana.supply.asign.type,day_assig_defect:0
681+msgid "Miercoles"
682+msgstr "Miercoles"
683+
684+#. module: supply_control
685+#: view:diana.supply.lines:0
686+msgid "Search Supply State"
687+msgstr "Búsqueda por estado de suministros"
688+
689+#. module: supply_control
690+#: field:diana.supply.asign.type,active:0
691+msgid "Activo"
692+msgstr "Activo"
693+
694+#. module: supply_control
695+#: model:ir.actions.act_window,name:supply_control.action_diana_supply_line_tree
696+msgid "Lineas de Asignación"
697+msgstr "Lineas de Asignación"
698+
699+#. module: supply_control
700+#: field:diana.supply.asign.type,user_ids:0
701+#: field:diana.supply.printer,employee_ids:0
702+msgid "Usuarios"
703+msgstr "Usuarios"
704+
705+#. module: supply_control
706+#: view:diana.supply.lines:0
707+#: report:report.sede.suministros:0
708+#: field:wizard.supply,estado:0
709+msgid "Estado"
710+msgstr "Estado"
711+
712+#. module: supply_control
713+#: report:report.sede.suministros:0
714+msgid "TOTAL EXPIRADOS"
715+msgstr "TOTAL EXPIRADOS"
716+
717+#. module: supply_control
718+#: model:ir.model,name:supply_control.model_diana_supply_lines
719+msgid "diana.supply.lines"
720+msgstr "diana.supply.lines"
721+
722+#. module: supply_control
723+#: field:diana.supply.asign.type,quantity:0
724+msgid "Cantidad acumular"
725+msgstr "Cantidad acumular"
726+
727+#. module: supply_control
728+#: view:wizard.supply:0
729+msgid "Generar Reporte"
730+msgstr "Generar Reporte"
731+
732+#. module: supply_control
733+#: model:ir.model,name:supply_control.model_diana_supply_asign
734+msgid "diana.supply.asign"
735+msgstr "diana.supply.asign"
736+
737+#. module: supply_control
738+#: report:report.sede.suministros:0
739+msgid "TOTAL BORRADOR"
740+msgstr "TOTAL BORRADOR"
741+
742+#. module: supply_control
743+#: model:ir.model,name:supply_control.model_diana_supply_asign_type
744+msgid "diana.supply.asign.type"
745+msgstr "diana.supply.asign.type"
746+
747+#. module: supply_control
748+#: report:report.sede.suministros:0
749+msgid "Mes:"
750+msgstr "Mes:"
751+
752+#. module: supply_control
753+#: field:diana.supply.asign,asigned_date:0
754+#: field:diana.supply.lines,asigned_date:0
755+msgid "Asignation Date"
756+msgstr "Fecha de asignación"
757+
758+#. module: supply_control
759+#: view:diana.supply.lines:0
760+#: report:report.sede.suministros:0
761+msgid "Periodo"
762+msgstr "Periodo"
763+
764+#. module: supply_control
765+#: view:diana.supply.printer:0
766+msgid "Configuración de impresoras"
767+msgstr "Configuración de impresoras"
768+
769+#. module: supply_control
770+#: field:diana.supply.asign,period_id:0
771+#: field:diana.supply.lines,period_id:0
772+msgid "Period"
773+msgstr "Período"
774+
775+#. module: supply_control
776+#: field:diana.supply.printer,ip_address:0
777+msgid "IP Address"
778+msgstr "Dirección IP"
779+
780+#. module: supply_control
781+#: report:sede.suministro:0
782+msgid "NOMBRE y APELLIDO"
783+msgstr "NOMBRE y APELLIDO"
784+
785+#. module: supply_control
786+#: report:sede.suministro:0
787+msgid "/ Pagina:"
788+msgstr "/ Pagina:"
789+
790+#. module: supply_control
791+#: view:diana.supply.lines:0
792+#: field:diana.supply.lines,delivered:0
793+#: selection:diana.supply.lines,state:0
794+msgid "Delivered"
795+msgstr "Entregado"
796+
797+#. module: supply_control
798+#: selection:wizard.supply,estado:0
799+msgid "Expirado"
800+msgstr "Expirado"
801+
802+#. module: supply_control
803+#: view:diana.supply.lines:0
804+msgid "Agrupar por..."
805+msgstr "Agrupar por..."
806+
807+#. module: supply_control
808+#: selection:diana.supply.asign,state:0
809+#: selection:wizard.supply,estado:0
810+msgid "Borrador"
811+msgstr "Borrador"
812+
813+#. module: supply_control
814+#: report:sede.suministro:0
815+msgid "FECHA"
816+msgstr "FECHA"
817+
818+#. module: supply_control
819+#: field:diana.supply.printer,machine_pass:0
820+msgid "User pass"
821+msgstr "Contraseña de usuario"
822+
823+#. module: supply_control
824+#: field:diana.supply.asign,asigned_type:0
825+#: field:diana.supply.asign,name:0
826+#: field:diana.supply.asign.type,name:0
827+msgid "Tipo de Asignación"
828+msgstr "Tipo de Asignación"
829+
830+#. module: supply_control
831+#: model:ir.actions.report.xml,name:supply_control.supply_report
832+msgid "Reporte de Suministro"
833+msgstr "Reporte de Suministro"
834+
835+#. module: supply_control
836+#: report:sede.suministro:0
837+msgid "Pag."
838+msgstr "Pag."
839+
840+#. module: supply_control
841+#: field:diana.supply.printer,upload_dir:0
842+msgid "Remote Directory"
843+msgstr "Directorio remoto"
844+
845+#. module: supply_control
846+#: selection:diana.supply.asign.type,day_assig_defect:0
847+msgid "Viernes"
848+msgstr "Viernes"
849+
850+#. module: supply_control
851+#: field:diana.supply.asign,state:0
852+#: view:diana.supply.printer:0
853+msgid "Estatus"
854+msgstr "Estatus"
855+
856+#. module: supply_control
857+#: view:diana.supply.asign:0
858+msgid "Return to draft"
859+msgstr "Return to draft"
860+
861+#. module: supply_control
862+#: view:diana.supply.lines:0
863+msgid "Deliver"
864+msgstr "Entregar"
865+
866+#. module: supply_control
867+#: model:ir.actions.report.xml,name:supply_control.supply_lines_sede_report
868+msgid "Reporte de Suministro por sede"
869+msgstr "Reporte de Suministro por sede"
870+
871+#. module: supply_control
872+#: selection:wizard.supply,estado:0
873+msgid "Entregado"
874+msgstr "Entregado"
875+
876+#. module: supply_control
877+#: model:ir.actions.act_window,name:supply_control.action_printers_wizard_confirm
878+msgid "Printing Confirmation"
879+msgstr "Confirmación de impresión"
880+
881+#. module: supply_control
882+#: model:ir.actions.report.xml,name:supply_control.supply_lines_report
883+msgid "Report Latex Supply Lines Sisb"
884+msgstr "Reporte latex de lineas de suministros SISB"
885+
886+#. module: supply_control
887+#: view:diana.supply.asign:0
888+msgid "¿Confirmar proceso de la creación de asignaciones?"
889+msgstr "¿Confirmar proceso de la creación de asignaciones?"
890+
891+#. module: supply_control
892+#: report:report.sede.suministros:0
893+msgid "TOTAL ENTREGADOS:"
894+msgstr "TOTAL ENTREGADOS:"
895+
896+#. module: supply_control
897+#: report:sede.suministro:0
898+msgid "CODIGO"
899+msgstr "CODIGO"
900+
901+#. module: supply_control
902+#: view:diana.supply.lines:0
903+#: selection:diana.supply.lines,state:0
904+msgid "Expired"
905+msgstr "Expirado"
906+
907+#. module: supply_control
908+#: field:diana.supply.asign.type,create_month:0
909+msgid "Crear en el mes corriente?"
910+msgstr "Crear en el mes corriente?"
911+
912+#. module: supply_control
913+#: field:diana.supply.asign,employee_ids:0
914+msgid "Employees"
915+msgstr "Empleados"
916+
917+#. module: supply_control
918+#: field:diana.supply.lines,asign_id:0
919+msgid "Asignation"
920+msgstr "Asignación"
921+
922+#. module: supply_control
923+#: report:report.sede.suministros:0
924+msgid "Codigo"
925+msgstr "Codigo"
926+
927+#. module: supply_control
928+#: field:diana.supply.asign.detail,name:0
929+msgid "Descripción"
930+msgstr "Descripción"
931+
932+#. module: supply_control
933+#: view:diana.supply.printers.wizard:0
934+msgid "Yes"
935+msgstr "Si"
936+
937+#. module: supply_control
938+#: report:report.sede.suministros:0
939+msgid "Sede:"
940+msgstr "Sede:"
941+
942+#. module: supply_control
943+#: field:diana.supply.asign.detail,qty:0
944+#: report:report.sede.suministros:0
945+msgid "Cantidad"
946+msgstr "Cantidad"
947+
948+#. module: supply_control
949+#: field:diana.supply.printer,file_name:0
950+msgid "File Name"
951+msgstr "Nombre del archivo"
952+
953+#. module: supply_control
954+#: view:diana.supply.asign.type:0
955+#: model:ir.ui.menu,name:supply_control.supply_configuration_type
956+msgid "Tipos de Asignaciones"
957+msgstr "Tipos de Asignaciones"
958+
959+#. module: supply_control
960+#: selection:diana.supply.asign,state:0
961+msgid "Asignado"
962+msgstr "Asignado"
963+
964+#. module: supply_control
965+#: field:diana.supply.asign.type,monthly:0
966+msgid "Crear una vez al mes?"
967+msgstr "Crear una vez al mes?"
968+
969+#. module: supply_control
970+#: view:diana.supply.lines:0
971+msgid "Asignaciónes"
972+msgstr "Asignaciónes"
973+
974+#. module: supply_control
975+#: report:report.sede.suministros:0
976+msgid "Total"
977+msgstr "Total"
978+
979+#. module: supply_control
980+#: view:wizard.supply:0
981+msgid "Imprimir Reporte"
982+msgstr "Imprimir Reporte"
983+
984+#. module: supply_control
985+#: field:diana.supply.lines,print_verify:0
986+msgid "Print verification"
987+msgstr "Verificación de impresión"
988
989
990=== modified file 'supply_control/model/diana_supply_lines.py'
991--- supply_control/model/diana_supply_lines.py 2018-10-05 16:29:45 +0000
992+++ supply_control/model/diana_supply_lines.py 2018-12-06 12:31:45 +0000
993@@ -165,9 +165,11 @@
994
995 error_imprimir = frc.transferAndprint()
996
997- if not error_imprimir:
998+ if not error_imprimir[0]:
999 raise osv.except_osv(
1000- ('Alert !'), ('Por favor verifique la conexion.'))
1001+ ('Alert !'),
1002+ ('Por favor verifique la conexion.\n {}'.format(
1003+ error_imprimir[1])))
1004
1005 dicc_values = {'delivery_date': today, 'state': 'Delivered',
1006 'delivered': True, 'expiration_date': None,
1007
1008=== modified file 'supply_control/model/remote_print.py'
1009--- supply_control/model/remote_print.py 2018-10-05 13:37:08 +0000
1010+++ supply_control/model/remote_print.py 2018-12-06 12:31:45 +0000
1011@@ -19,5 +19,5 @@
1012 try:
1013 res = cliente.imprimir(archivo)
1014 except Exception, e:
1015- return e
1016- return res
1017+ return False, e
1018+ return True, res
1019
1020=== modified file 'supply_control/view/diana_supply_view.xml'
1021--- supply_control/view/diana_supply_view.xml 2018-10-05 16:29:45 +0000
1022+++ supply_control/view/diana_supply_view.xml 2018-12-06 12:31:45 +0000
1023@@ -37,12 +37,20 @@
1024 <field name="day_assig_defect"/>
1025 <field name="monthly"/>
1026 <field name="create_month"/>
1027- <field name="user_ids" nolabel="True" colspan="4" >
1028- <tree>
1029- <field name="login"/>
1030- <field name="name"/>
1031- </tree>
1032- </field>
1033+ <notebook colspan="6">
1034+ <page string="Configuration of users" name="configuration_user">
1035+ <field name="user_ids" nolabel="1">
1036+ <tree>
1037+ <field name="login"/>
1038+ <field name="name"/>
1039+ </tree>
1040+ </field>
1041+ </page>
1042+ <page string="Notes" name="notes">
1043+
1044+ </page>
1045+ </notebook>
1046+
1047 </form>
1048 </field>
1049 </record>
1050
1051=== added directory 'supply_control_update'
1052=== added file 'supply_control_update/README.md'
1053=== added file 'supply_control_update/__init__.py'
1054--- supply_control_update/__init__.py 1970-01-01 00:00:00 +0000
1055+++ supply_control_update/__init__.py 2018-12-06 12:31:45 +0000
1056@@ -0,0 +1,2 @@
1057+
1058+from . import models
1059
1060=== added file 'supply_control_update/__openerp__.py'
1061--- supply_control_update/__openerp__.py 1970-01-01 00:00:00 +0000
1062+++ supply_control_update/__openerp__.py 2018-12-06 12:31:45 +0000
1063@@ -0,0 +1,26 @@
1064+
1065+{
1066+ 'name': 'Control de entrega de asignaciones - Update',
1067+ 'version': '1.0.0',
1068+ 'category': 'Human Resources',
1069+ 'sequence': 40,
1070+ 'complexity': 'normal',
1071+ 'description': '''
1072+Este modulo permite el control para la entrega de asignaciones en Industrias
1073+Diana C.A. y realizar la impresion de los tickets correspondientes.
1074+''',
1075+ 'author': 'Industrias Diana C.A.',
1076+ 'website': 'http://www.industriasdiana.gob.ve',
1077+ 'depends': [
1078+ 'supply_control'
1079+ ],
1080+ 'update_xml': [
1081+ 'security/supply_security.xml',
1082+ 'security/ir.model.access.csv',
1083+ 'views/hr_employee_views.xml',
1084+ 'views/diana_supply_views.xml',
1085+ ],
1086+ 'data': [],
1087+ 'installable': True,
1088+ 'active': False
1089+}
1090
1091=== added directory 'supply_control_update/i18n'
1092=== added file 'supply_control_update/i18n/es_VE.po'
1093--- supply_control_update/i18n/es_VE.po 1970-01-01 00:00:00 +0000
1094+++ supply_control_update/i18n/es_VE.po 2018-12-06 12:31:45 +0000
1095@@ -0,0 +1,154 @@
1096+# Translation of OpenERP Server.
1097+# This file contains the translation of the following modules:
1098+# * supply_control_update
1099+#
1100+msgid ""
1101+msgstr ""
1102+"Project-Id-Version: OpenERP Server 6.0.4\n"
1103+"Report-Msgid-Bugs-To: support@openerp.com\n"
1104+"POT-Creation-Date: 2018-12-05 15:17+0000\n"
1105+"PO-Revision-Date: 2018-12-05 15:17+0000\n"
1106+"Last-Translator: <>\n"
1107+"Language-Team: \n"
1108+"MIME-Version: 1.0\n"
1109+"Content-Type: text/plain; charset=UTF-8\n"
1110+"Content-Transfer-Encoding: \n"
1111+"Plural-Forms: \n"
1112+
1113+#. module: supply_control_update
1114+#: code:addons/supply_control_update/models/lock_assig.py:45
1115+#, python-format
1116+msgid "The user {} add the list of blocked assignments {}"
1117+msgstr "El usuario {} agrego {}"
1118+
1119+#. module: supply_control_update
1120+#: view:diana.supply.asign.type:0
1121+msgid "Empleados no permitidos"
1122+msgstr "Empleados no permitidos"
1123+
1124+#. module: supply_control_update
1125+#: field:hr.employee,lock_history_ids:0
1126+#: model:ir.model,name:supply_control_update.model_diana_supply_lock_history
1127+msgid "Lock history"
1128+msgstr "Lock history"
1129+
1130+#. module: supply_control_update
1131+#: sql_constraint:hr.employee:0
1132+msgid "El numero de cedula del trabajador debe ser unico"
1133+msgstr "El numero de cedula del trabajador debe ser unico"
1134+
1135+#. module: supply_control_update
1136+#: code:addons/supply_control_update/models/lock_assig.py:25
1137+#: sql_constraint:diana.supply.lock.assignment:0
1138+#, python-format
1139+msgid "You can not duplicate assignments in this section."
1140+msgstr "No puedes duplicar tipos de asignación en esta sección."
1141+
1142+#. module: supply_control_update
1143+#: field:diana.supply.lock.assignment,date:0
1144+msgid "Date lock"
1145+msgstr "Fecha"
1146+
1147+#. module: supply_control_update
1148+#: field:diana.supply.lock.assignment,employee_id:0
1149+#: field:diana.supply.lock.history,employee_id:0
1150+#: model:ir.model,name:supply_control_update.model_hr_employee
1151+msgid "Employee"
1152+msgstr "Employee"
1153+
1154+#. module: supply_control_update
1155+#: view:hr.employee:0
1156+msgid "Todas las asignaciones bloqueadas..."
1157+msgstr "Todas las asignaciones bloqueadas..."
1158+
1159+#. module: supply_control_update
1160+#: field:diana.supply.lock.assignment,asig_type:0
1161+#: field:diana.supply.lock.history,asig_type:0
1162+msgid "Type of assignment"
1163+msgstr "Tipo de asignación"
1164+
1165+#. module: supply_control_update
1166+#: field:diana.supply.lock.history,name:0
1167+msgid "Description"
1168+msgstr "Descripción"
1169+
1170+#. module: supply_control_update
1171+#: field:diana.supply.asign.type,lock_assig_ids:0
1172+#: view:hr.employee:0
1173+#: field:hr.employee,lock_assig_ids:0
1174+#: model:ir.model,name:supply_control_update.model_diana_supply_lock_assignment
1175+msgid "Lock assignments"
1176+msgstr "Asignaciones no permitidas"
1177+
1178+#. module: supply_control_update
1179+#: field:diana.supply.lock.history,user_id:0
1180+msgid "User"
1181+msgstr "Usuario"
1182+
1183+#. module: supply_control_update
1184+#: field:diana.supply.lock.history,date:0
1185+msgid "Date"
1186+msgstr "Fecha"
1187+
1188+#. module: supply_control_update
1189+#: constraint:hr.employee:0
1190+msgid "Error ! You cannot create recursive Hierarchy of Employees."
1191+msgstr "Error ! You cannot create recursive Hierarchy of Employees."
1192+
1193+#. module: supply_control_update
1194+#: model:ir.model,name:supply_control_update.model_diana_supply_lines
1195+msgid "diana.supply.lines"
1196+msgstr "diana.supply.lines"
1197+
1198+#. module: supply_control_update
1199+#: constraint:hr.employee:0
1200+msgid "Error ! You cannot select a department for which the employee is the manager."
1201+msgstr "Error ! You cannot select a department for which the employee is the manager."
1202+
1203+#. module: supply_control_update
1204+#: code:addons/supply_control_update/models/supply_control.py:44
1205+#, python-format
1206+msgid "Error!"
1207+msgstr "Error!"
1208+
1209+#. module: supply_control_update
1210+#: field:diana.supply.lock.assignment,name:0
1211+msgid "Supply Reference"
1212+msgstr "Supply Reference"
1213+
1214+#. module: supply_control_update
1215+#: sql_constraint:hr.employee:0
1216+msgid "El codigo del trabajador debe ser unico"
1217+msgstr "El codigo del trabajador debe ser unico"
1218+
1219+#. module: supply_control_update
1220+#: model:ir.model,name:supply_control_update.model_diana_supply_asign_type
1221+msgid "diana.supply.asign.type"
1222+msgstr "diana.supply.asign.type"
1223+
1224+#. module: supply_control_update
1225+#: view:hr.employee:0
1226+msgid "History"
1227+msgstr "Historial"
1228+
1229+#. module: supply_control_update
1230+#: code:addons/supply_control_update/models/lock_assig.py:68
1231+#, python-format
1232+msgid "The user {} remove the list of blocked assignments {}"
1233+msgstr "El usuario {} elimino {}"
1234+
1235+#. module: supply_control_update
1236+#: sql_constraint:hr.employee:0
1237+msgid "La cuenta bancaria seleccionada ya esta asignada a otro Trabajador"
1238+msgstr "La cuenta bancaria seleccionada ya esta asignada a otro Trabajador"
1239+
1240+#. module: supply_control_update
1241+#: field:hr.employee,lock_all:0
1242+msgid "Lock all"
1243+msgstr "Bloquear todas las asignaciones"
1244+
1245+#. module: supply_control_update
1246+#: view:hr.employee:0
1247+msgid "Message"
1248+msgstr "Mensaje"
1249+
1250
1251=== added directory 'supply_control_update/models'
1252=== added file 'supply_control_update/models/__init__.py'
1253--- supply_control_update/models/__init__.py 1970-01-01 00:00:00 +0000
1254+++ supply_control_update/models/__init__.py 2018-12-06 12:31:45 +0000
1255@@ -0,0 +1,4 @@
1256+
1257+from . import lock_assig
1258+from . import hr_employee
1259+from . import supply_control
1260
1261=== added file 'supply_control_update/models/hr_employee.py'
1262--- supply_control_update/models/hr_employee.py 1970-01-01 00:00:00 +0000
1263+++ supply_control_update/models/hr_employee.py 2018-12-06 12:31:45 +0000
1264@@ -0,0 +1,54 @@
1265+
1266+from datetime import datetime
1267+
1268+from osv import fields, osv
1269+from tools.translate import _
1270+
1271+
1272+class Employee(osv.osv):
1273+ """."""
1274+
1275+ _inherit = 'hr.employee'
1276+ _columns = {
1277+ 'lock_assig_ids': fields.one2many(
1278+ 'diana.supply.lock.assignment', 'employee_id',
1279+ 'Lock assignments'),
1280+ 'lock_history_ids': fields.one2many(
1281+ 'diana.supply.lock.history', 'employee_id',
1282+ 'Lock history'),
1283+ 'lock_all': fields.boolean('Lock all')
1284+ }
1285+
1286+ def write(self, cr, uid, ids, vals, context=None):
1287+ """."""
1288+ if context is None:
1289+ context = {}
1290+
1291+ res = super(Employee, self).write(
1292+ cr, uid, ids, vals, context)
1293+
1294+ if res and 'lock_all' in vals:
1295+ history = self.pool.get('diana.supply.lock.history')
1296+ users = self.pool.get('res.users')
1297+ user = users.browse(cr, uid, uid)
1298+ lock_all = vals['lock_all']
1299+ if lock_all:
1300+ msg = _(
1301+ 'El usuario {} bloquea todas las asignaciones.'.format(
1302+ user.login))
1303+ else:
1304+ msg = _(
1305+ 'El usuario {} desbloquea todas las asignaciones.'.format(
1306+ user.login))
1307+ val = {
1308+ 'name': msg,
1309+ 'employee_id': ids[0],
1310+ 'asig_type': False,
1311+ 'user_id': uid,
1312+ 'date': datetime.now()
1313+ }
1314+ history.create(cr, uid, val)
1315+ return res
1316+
1317+
1318+Employee()
1319
1320=== added file 'supply_control_update/models/lock_assig.py'
1321--- supply_control_update/models/lock_assig.py 1970-01-01 00:00:00 +0000
1322+++ supply_control_update/models/lock_assig.py 2018-12-06 12:31:45 +0000
1323@@ -0,0 +1,103 @@
1324+
1325+import unicodedata
1326+
1327+from datetime import datetime
1328+
1329+from osv import fields, osv
1330+from tools.translate import _
1331+
1332+
1333+class LockAssignments(osv.osv):
1334+ """."""
1335+
1336+ _name = 'diana.supply.lock.assignment'
1337+ _description = 'Lock assignments'
1338+ _columns = {
1339+ 'name': fields.char('Supply Reference', size=128),
1340+ 'employee_id': fields.many2one('hr.employee', 'Employee'),
1341+ 'asig_type': fields.many2one(
1342+ 'diana.supply.asign.type', 'Type of assignment', required=True),
1343+ 'date': fields.date('Date lock'),
1344+ }
1345+ _defaults = {}
1346+ _sql_constraints = [
1347+ ('unique_type_assig', 'unique(asig_type, employee_id)',
1348+ _('You can not duplicate assignments in this section.'))
1349+ ]
1350+
1351+ def elimina_tildes(self, s):
1352+ """."""
1353+ return ''.join(
1354+ (c for c in unicodedata.normalize('NFD', s)
1355+ if unicodedata.category(c) != 'Mn')
1356+ ).replace("'", "")
1357+
1358+ def create(self, cr, uid, vals, context=None):
1359+ """."""
1360+ if context is None:
1361+ context = {}
1362+ history = self.pool.get('diana.supply.lock.history')
1363+ users = self.pool.get('res.users')
1364+ type_assig = self.pool.get('diana.supply.asign.type')
1365+ user = users.browse(cr, uid, uid, context=context)
1366+ lock_asig = type_assig.browse(cr, uid, vals['asig_type'])
1367+ msg = _(
1368+ 'The user {} add the list of blocked assignments {}').format(
1369+ user.login, self.elimina_tildes(lock_asig.name))
1370+ val = {
1371+ 'name': msg,
1372+ 'employee_id': vals['employee_id'],
1373+ 'asig_type': vals['asig_type'],
1374+ 'user_id': user.id,
1375+ 'date': datetime.now()
1376+ }
1377+
1378+ res = super(LockAssignments, self).create(cr, uid, vals, context)
1379+ if res:
1380+ history.create(cr, uid, val, context=context)
1381+ return res
1382+
1383+ def unlink(self, cr, uid, ids, context=None):
1384+ """."""
1385+ if context is None:
1386+ context = {}
1387+ history = self.pool.get('diana.supply.lock.history')
1388+ users = self.pool.get('res.users')
1389+ user = users.browse(cr, uid, uid, context=context)
1390+ lock_asig = self.browse(cr, uid, ids)
1391+ msg = _(
1392+ 'The user {} remove the list of blocked assignments {}').format(
1393+ user.login, self.elimina_tildes(lock_asig[0].asig_type.name))
1394+ vals = {
1395+ 'name': msg,
1396+ 'employee_id': lock_asig[0].employee_id.id,
1397+ 'asig_type': lock_asig[0].asig_type.id,
1398+ 'user_id': user.id,
1399+ 'date': datetime.now()
1400+ }
1401+ res = super(LockAssignments, self).unlink(cr, uid, ids, context)
1402+ if res:
1403+ history.create(cr, uid, vals, context=context)
1404+ return res
1405+
1406+
1407+LockAssignments()
1408+
1409+
1410+class LockHistory(osv.osv):
1411+ """."""
1412+
1413+ _name = 'diana.supply.lock.history'
1414+ _description = 'Lock history'
1415+ _order = 'id desc'
1416+ _columns = {
1417+ 'name': fields.char('Description', size=256),
1418+ 'employee_id': fields.many2one('hr.employee', 'Employee'),
1419+ 'asig_type': fields.many2one(
1420+ 'diana.supply.asign.type', 'Type of assignment'),
1421+ 'user_id': fields.many2one('res.users', 'User'),
1422+ 'date': fields.datetime('Date')
1423+ }
1424+
1425+
1426+LockHistory()
1427
1428=== added file 'supply_control_update/models/supply_control.py'
1429--- supply_control_update/models/supply_control.py 1970-01-01 00:00:00 +0000
1430+++ supply_control_update/models/supply_control.py 2018-12-06 12:31:45 +0000
1431@@ -0,0 +1,55 @@
1432+
1433+import unicodedata
1434+
1435+from osv import fields, osv
1436+from tools.translate import _
1437+
1438+
1439+class diana_supply_asign_type(osv.osv):
1440+ """."""
1441+
1442+ _inherit = 'diana.supply.asign.type'
1443+ _columns = {
1444+ 'lock_assig_ids': fields.one2many(
1445+ 'diana.supply.lock.assignment', 'asig_type',
1446+ 'Lock assignments'),
1447+ }
1448+
1449+
1450+diana_supply_asign_type()
1451+
1452+
1453+class diana_supply_lines(osv.osv):
1454+ """."""
1455+
1456+ _inherit = 'diana.supply.lines'
1457+
1458+ def elimina_tildes(self, s):
1459+ """."""
1460+ return ''.join(
1461+ (c for c in unicodedata.normalize('NFD', s)
1462+ if unicodedata.category(c) != 'Mn')
1463+ ).replace("'", "")
1464+
1465+ def action_deliver(self, cr, uid, ids, context=None):
1466+ """."""
1467+ obj_brw = self.browse(cr, uid, ids)
1468+ for line in obj_brw:
1469+ employee = line.employee_id
1470+ asigned_type = line.asigned_type
1471+ if employee.lock_all or employee.no_remunerado or\
1472+ asigned_type.id in [i.asig_type.id
1473+ for i in employee.lock_assig_ids]:
1474+ raise osv.except_osv(
1475+ _('Error!'), _(
1476+ 'El trabajador {} con el cod. {} no tiene las '
1477+ 'condiciones para recibir {}'.format(
1478+ self.elimina_tildes(employee.name),
1479+ employee.cod_number,
1480+ self.elimina_tildes(line.asigned_type.name).upper()
1481+ )))
1482+ return super(
1483+ diana_supply_lines, self).action_deliver(cr, uid, ids, context)
1484+
1485+
1486+diana_supply_lines()
1487
1488=== added directory 'supply_control_update/security'
1489=== added file 'supply_control_update/security/ir.model.access.csv'
1490--- supply_control_update/security/ir.model.access.csv 1970-01-01 00:00:00 +0000
1491+++ supply_control_update/security/ir.model.access.csv 2018-12-06 12:31:45 +0000
1492@@ -0,0 +1,10 @@
1493+id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
1494+
1495+access_control_update_manager,diana.supply.lock.assignment,model_diana_supply_lock_assignment,group_lock_assignment_supply_manager,1,1,1,1
1496+
1497+access_control_update_history_manager,diana.supply.lock.history,model_diana_supply_lock_history,group_lock_assignment_supply_manager,1,1,1,0
1498+
1499+
1500+access_control_update_user,diana.supply.lock.assignment,model_diana_supply_lock_assignment,group_lock_assignment_supply_user,1,0,0,0
1501+
1502+access_control_update_history_user,diana.supply.lock.history,model_diana_supply_lock_history,group_lock_assignment_supply_user,1,0,0,0
1503\ No newline at end of file
1504
1505=== added file 'supply_control_update/security/supply_security.xml'
1506--- supply_control_update/security/supply_security.xml 1970-01-01 00:00:00 +0000
1507+++ supply_control_update/security/supply_security.xml 2018-12-06 12:31:45 +0000
1508@@ -0,0 +1,12 @@
1509+<?xml version="1.0" encoding="utf-8"?>
1510+<openerp>
1511+ <data noupdate="1">
1512+ <record id="group_lock_assignment_supply_manager" model="res.groups">
1513+ <field name="name">Asignaciones no permitidas / Manager</field>
1514+ </record>
1515+
1516+ <record id="group_lock_assignment_supply_user" model="res.groups">
1517+ <field name="name">Asignaciones no permitidas / user</field>
1518+ </record>
1519+ </data>
1520+</openerp>
1521
1522=== added directory 'supply_control_update/views'
1523=== added file 'supply_control_update/views/diana_supply_views.xml'
1524--- supply_control_update/views/diana_supply_views.xml 1970-01-01 00:00:00 +0000
1525+++ supply_control_update/views/diana_supply_views.xml 2018-12-06 12:31:45 +0000
1526@@ -0,0 +1,24 @@
1527+<?xml version="1.0" encoding="utf-8"?>
1528+<openerp>
1529+<data>
1530+
1531+ <record model="ir.ui.view" id="diana_supply_asign_type_update">
1532+ <field name="name">diana.supply.asign.type.update</field>
1533+ <field name="model">diana.supply.asign.type</field>
1534+ <field name="type">form</field>
1535+ <field name="inherit_id" ref="supply_control.view_diana_supply_asign_type_form" />
1536+ <field name="arch" type="xml">
1537+ <xpath expr='/form/notebook/page[@name="configuration_user"]' position='after'>
1538+ <page string="Empleados no permitidos">
1539+ <field name='lock_assig_ids' nolabel="1" readonly="1">
1540+ <tree editable="bottom">
1541+ <field name='employee_id'/>
1542+ </tree>
1543+ </field>
1544+ </page>
1545+ </xpath>
1546+ </field>
1547+ </record>
1548+
1549+</data>
1550+</openerp>
1551
1552=== added file 'supply_control_update/views/hr_employee_views.xml'
1553--- supply_control_update/views/hr_employee_views.xml 1970-01-01 00:00:00 +0000
1554+++ supply_control_update/views/hr_employee_views.xml 2018-12-06 12:31:45 +0000
1555@@ -0,0 +1,50 @@
1556+<?xml version="1.0" encoding="utf-8"?>
1557+<openerp>
1558+ <data>
1559+
1560+ <record model="ir.ui.view" id="view_employee_form_lock_assig">
1561+ <field name="name">view.employee.form.lock.assig</field>
1562+ <field name="model">hr.employee</field>
1563+ <field name="type">form</field>
1564+ <field name="inherit_id" ref="sisb_nomina.view_employee_form_inherit_2"/>
1565+ <field name="arch" type="xml">
1566+ <xpath expr='/form/notebook/page[@string="Notes"]' position='before'>
1567+
1568+ <page string="Lock assignments" groups="supply_control_update.group_lock_assignment_supply_manager">
1569+ <group colspan="4" col="4">
1570+ <field name='lock_all'/>
1571+ </group>
1572+ <label string="Todas las asignaciones bloqueadas..." attrs="{'invisible':[('lock_all','=', False)]}"/>
1573+ <newline/>
1574+
1575+ <notebook>
1576+ <page string="Lock assignments" attrs="{'invisible':[('lock_all', '=', True)]}">
1577+ <field name="lock_assig_ids" nolabel="1" attrs="{'readonly':[('lock_all','=', True)]}">
1578+
1579+ <tree editable="bottom">
1580+ <field name='asig_type'/>
1581+ </tree>
1582+
1583+ </field>
1584+ </page>
1585+ <page string="History">
1586+ <field name="lock_history_ids" nolabel="1" readonly='1'>
1587+
1588+ <tree editable="bottom">
1589+ <field name='date'/>
1590+ <field name='user_id'/>
1591+ <field name='name' string="Message"/>
1592+ <field name='asig_type'/>
1593+ </tree>
1594+
1595+ </field>
1596+ </page>
1597+ </notebook>
1598+
1599+ </page>
1600+ </xpath>
1601+ </field>
1602+ </record>
1603+
1604+</data>
1605+</openerp>
1606
1607=== added file 'supply_control_update/views/lock_assig_views.xml'
1608--- supply_control_update/views/lock_assig_views.xml 1970-01-01 00:00:00 +0000
1609+++ supply_control_update/views/lock_assig_views.xml 2018-12-06 12:31:45 +0000
1610@@ -0,0 +1,2 @@
1611+
1612+

Subscribers

People subscribed via source and target branches