Compare commits
	
		
			4 Commits
		
	
	
		
			9a31749b02
			...
			main
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
						 | 
					926a34e124 | ||
| 
						 | 
					92147163ad | ||
| 
						 | 
					ca137b324f | ||
| 
						 | 
					39d8814e72 | 
							
								
								
									
										218
									
								
								.gitignore
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										218
									
								
								.gitignore
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,218 @@
 | 
				
			|||||||
 | 
					# ---> Python
 | 
				
			||||||
 | 
					# Byte-compiled / optimized / DLL files
 | 
				
			||||||
 | 
					__pycache__/
 | 
				
			||||||
 | 
					*.py[cod]
 | 
				
			||||||
 | 
					*$py.class
 | 
				
			||||||
 | 
					*.bk
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# C extensions
 | 
				
			||||||
 | 
					*.so
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Distribution / packaging
 | 
				
			||||||
 | 
					.Python
 | 
				
			||||||
 | 
					build/
 | 
				
			||||||
 | 
					develop-eggs/
 | 
				
			||||||
 | 
					dist/
 | 
				
			||||||
 | 
					downloads/
 | 
				
			||||||
 | 
					eggs/
 | 
				
			||||||
 | 
					.eggs/
 | 
				
			||||||
 | 
					lib/
 | 
				
			||||||
 | 
					lib64/
 | 
				
			||||||
 | 
					parts/
 | 
				
			||||||
 | 
					sdist/
 | 
				
			||||||
 | 
					var/
 | 
				
			||||||
 | 
					wheels/
 | 
				
			||||||
 | 
					pip-wheel-metadata/
 | 
				
			||||||
 | 
					share/python-wheels/
 | 
				
			||||||
 | 
					*.egg-info/
 | 
				
			||||||
 | 
					.installed.cfg
 | 
				
			||||||
 | 
					*.egg
 | 
				
			||||||
 | 
					MANIFEST
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# PyInstaller
 | 
				
			||||||
 | 
					#  Usually these files are written by a python script from a template
 | 
				
			||||||
 | 
					#  before PyInstaller builds the exe, so as to inject date/other infos into it.
 | 
				
			||||||
 | 
					*.manifest
 | 
				
			||||||
 | 
					*.spec
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Installer logs
 | 
				
			||||||
 | 
					pip-log.txt
 | 
				
			||||||
 | 
					pip-delete-this-directory.txt
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Unit test / coverage reports
 | 
				
			||||||
 | 
					htmlcov/
 | 
				
			||||||
 | 
					.tox/
 | 
				
			||||||
 | 
					.nox/
 | 
				
			||||||
 | 
					.coverage
 | 
				
			||||||
 | 
					.coverage.*
 | 
				
			||||||
 | 
					.cache
 | 
				
			||||||
 | 
					nosetests.xml
 | 
				
			||||||
 | 
					coverage.xml
 | 
				
			||||||
 | 
					*.cover
 | 
				
			||||||
 | 
					*.py,cover
 | 
				
			||||||
 | 
					.hypothesis/
 | 
				
			||||||
 | 
					.pytest_cache/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Translations
 | 
				
			||||||
 | 
					*.mo
 | 
				
			||||||
 | 
					*.pot
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Django stuff:
 | 
				
			||||||
 | 
					*.log
 | 
				
			||||||
 | 
					local_settings.py
 | 
				
			||||||
 | 
					db.sqlite3
 | 
				
			||||||
 | 
					db.sqlite3-journal
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Flask stuff:
 | 
				
			||||||
 | 
					instance/
 | 
				
			||||||
 | 
					.webassets-cache
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Scrapy stuff:
 | 
				
			||||||
 | 
					.scrapy
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Sphinx documentation
 | 
				
			||||||
 | 
					docs/_build/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# PyBuilder
 | 
				
			||||||
 | 
					target/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Jupyter Notebook
 | 
				
			||||||
 | 
					.ipynb_checkpoints
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# IPython
 | 
				
			||||||
 | 
					profile_default/
 | 
				
			||||||
 | 
					ipython_config.py
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# pyenv
 | 
				
			||||||
 | 
					.python-version
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# pipenv
 | 
				
			||||||
 | 
					#   According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
 | 
				
			||||||
 | 
					#   However, in case of collaboration, if having platform-specific dependencies or dependencies
 | 
				
			||||||
 | 
					#   having no cross-platform support, pipenv may install dependencies that don't work, or not
 | 
				
			||||||
 | 
					#   install all needed dependencies.
 | 
				
			||||||
 | 
					#Pipfile.lock
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# PEP 582; used by e.g. github.com/David-OConnor/pyflow
 | 
				
			||||||
 | 
					__pypackages__/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Celery stuff
 | 
				
			||||||
 | 
					celerybeat-schedule
 | 
				
			||||||
 | 
					celerybeat.pid
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# SageMath parsed files
 | 
				
			||||||
 | 
					*.sage.py
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Environments
 | 
				
			||||||
 | 
					.env
 | 
				
			||||||
 | 
					.venv
 | 
				
			||||||
 | 
					env/
 | 
				
			||||||
 | 
					venv/
 | 
				
			||||||
 | 
					ENV/
 | 
				
			||||||
 | 
					env.bak/
 | 
				
			||||||
 | 
					venv.bak/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Spyder project settings
 | 
				
			||||||
 | 
					.spyderproject
 | 
				
			||||||
 | 
					.spyproject
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Rope project settings
 | 
				
			||||||
 | 
					.ropeproject
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# mkdocs documentation
 | 
				
			||||||
 | 
					/site
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# mypy
 | 
				
			||||||
 | 
					.mypy_cache/
 | 
				
			||||||
 | 
					.dmypy.json
 | 
				
			||||||
 | 
					dmypy.json
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Pyre type checker
 | 
				
			||||||
 | 
					.pyre/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# ---> Emacs
 | 
				
			||||||
 | 
					# -*- mode: gitignore; -*-
 | 
				
			||||||
 | 
					*~
 | 
				
			||||||
 | 
					\#*\#
 | 
				
			||||||
 | 
					/.emacs.desktop
 | 
				
			||||||
 | 
					/.emacs.desktop.lock
 | 
				
			||||||
 | 
					*.elc
 | 
				
			||||||
 | 
					auto-save-list
 | 
				
			||||||
 | 
					tramp
 | 
				
			||||||
 | 
					.\#*
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Org-mode
 | 
				
			||||||
 | 
					.org-id-locations
 | 
				
			||||||
 | 
					*_archive
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# flymake-mode
 | 
				
			||||||
 | 
					*_flymake.*
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# eshell files
 | 
				
			||||||
 | 
					/eshell/history
 | 
				
			||||||
 | 
					/eshell/lastdir
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# elpa packages
 | 
				
			||||||
 | 
					/elpa/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# reftex files
 | 
				
			||||||
 | 
					*.rel
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# AUCTeX auto folder
 | 
				
			||||||
 | 
					/auto/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# cask packages
 | 
				
			||||||
 | 
					.cask/
 | 
				
			||||||
 | 
					dist/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Flycheck
 | 
				
			||||||
 | 
					flycheck_*.el
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# server auth directory
 | 
				
			||||||
 | 
					/server/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# projectiles files
 | 
				
			||||||
 | 
					.projectile
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# directory configuration
 | 
				
			||||||
 | 
					.dir-locals.el
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# network security
 | 
				
			||||||
 | 
					/network-security.data
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# ---> Vim
 | 
				
			||||||
 | 
					# Swap
 | 
				
			||||||
 | 
					[._]*.s[a-v][a-z]
 | 
				
			||||||
 | 
					!*.svg  # comment out if you don't need vector files
 | 
				
			||||||
 | 
					[._]*.sw[a-p]
 | 
				
			||||||
 | 
					[._]s[a-rt-v][a-z]
 | 
				
			||||||
 | 
					[._]ss[a-gi-z]
 | 
				
			||||||
 | 
					[._]sw[a-p]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Session
 | 
				
			||||||
 | 
					Session.vim
 | 
				
			||||||
 | 
					Sessionx.vim
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Temporary
 | 
				
			||||||
 | 
					.netrwhist
 | 
				
			||||||
 | 
					*~
 | 
				
			||||||
 | 
					# Auto-generated tag files
 | 
				
			||||||
 | 
					tags
 | 
				
			||||||
 | 
					# Persistent undo
 | 
				
			||||||
 | 
					[._]*.un~
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# ---> VirtualEnv
 | 
				
			||||||
 | 
					# Virtualenv
 | 
				
			||||||
 | 
					# http://iamzed.com/2009/05/07/a-primer-on-virtualenv/
 | 
				
			||||||
 | 
					.Python
 | 
				
			||||||
 | 
					[Bb]in
 | 
				
			||||||
 | 
					[Ii]nclude
 | 
				
			||||||
 | 
					[Ll]ib
 | 
				
			||||||
 | 
					[Ll]ib64
 | 
				
			||||||
 | 
					[Ll]ocal
 | 
				
			||||||
 | 
					[Ss]cripts
 | 
				
			||||||
 | 
					pyvenv.cfg
 | 
				
			||||||
 | 
					.venv
 | 
				
			||||||
 | 
					pip-selfcheck.json
 | 
				
			||||||
 | 
					
 | 
				
			||||||
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										30
									
								
								recepcion.py
									
									
									
									
									
								
							
							
						
						
									
										30
									
								
								recepcion.py
									
									
									
									
									
								
							@@ -1,9 +1,9 @@
 | 
				
			|||||||
# This file is part of Tryton.  The COPYRIGHT file at the top level of
 | 
					# This file is part of Tryton.  The COPYRIGHT file at the top level of
 | 
				
			||||||
# this repository contains the full copyright notices and license terms.
 | 
					# this repository contains the full copyright notices and license terms.
 | 
				
			||||||
from trytond.model import (ModelSQL, ModelView, fields)
 | 
					from trytond.model import (ModelSQL, ModelView, fields, Workflow)
 | 
				
			||||||
from datetime import datetime
 | 
					from datetime import datetime
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class Recepcion(ModelView, ModelSQL):
 | 
					class Recepcion(ModelView, ModelSQL, Workflow):
 | 
				
			||||||
    "Recepcion"
 | 
					    "Recepcion"
 | 
				
			||||||
    __name__= "taller.recepcion"
 | 
					    __name__= "taller.recepcion"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -11,11 +11,37 @@ class Recepcion(ModelView, ModelSQL):
 | 
				
			|||||||
    metodo_contacto=fields.Many2One('party.contact_mechanism', "Contacto")
 | 
					    metodo_contacto=fields.Many2One('party.contact_mechanism', "Contacto")
 | 
				
			||||||
    hora_entrada = fields.DateTime('Hora Entrada')
 | 
					    hora_entrada = fields.DateTime('Hora Entrada')
 | 
				
			||||||
    referencia = fields.Char("Referencia")
 | 
					    referencia = fields.Char("Referencia")
 | 
				
			||||||
 | 
					    descripcion = fields.Text("Descripcion")
 | 
				
			||||||
 | 
					    state = fields.Selection([("borrador","Borrador"),("registrado", "Registrado")],"Estado")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @classmethod
 | 
					    @classmethod
 | 
				
			||||||
    def default_hora_entrada(cls):
 | 
					    def default_hora_entrada(cls):
 | 
				
			||||||
        return datetime.now()
 | 
					        return datetime.now()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @classmethod
 | 
				
			||||||
 | 
					    def default_state(cls):
 | 
				
			||||||
 | 
					        return "borrador"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @classmethod         #constructor clase
 | 
				
			||||||
 | 
					    def __setup__(cls):
 | 
				
			||||||
 | 
					        super(Recepcion, cls).__setup__()
 | 
				
			||||||
 | 
					        cls._transitions=({("borrador","registrado"),("registrado","borrador") })
 | 
				
			||||||
 | 
					        cls._buttons.update({"registrado":{}, "borrador":{}})
 | 
				
			||||||
 | 
					         
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @classmethod
 | 
				
			||||||
 | 
					    @ModelView.button
 | 
				
			||||||
 | 
					    @Workflow.transition("registrado")
 | 
				
			||||||
 | 
					    def registrado(cls, records):
 | 
				
			||||||
 | 
					        pass
 | 
				
			||||||
 | 
						    
 | 
				
			||||||
 | 
					    
 | 
				
			||||||
 | 
					    @classmethod
 | 
				
			||||||
 | 
					    @ModelView.button
 | 
				
			||||||
 | 
					    @Workflow.transition("borrador")
 | 
				
			||||||
 | 
					    def borrador(cls, records):
 | 
				
			||||||
 | 
					        pass
 | 
				
			||||||
	    
 | 
						    
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        
 | 
					        
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -7,7 +7,18 @@ this repository contains the full copyright notices and license terms. -->
 | 
				
			|||||||
	    <field name="model">taller.recepcion</field>
 | 
						    <field name="model">taller.recepcion</field>
 | 
				
			||||||
	    <field name="type">form</field>
 | 
						    <field name="type">form</field>
 | 
				
			||||||
	    <field name="name">recepcion_form</field>
 | 
						    <field name="name">recepcion_form</field>
 | 
				
			||||||
 | 
					        </record>
 | 
				
			||||||
 | 
						<record model="ir.model.button" id="registrado_recepcion_button">
 | 
				
			||||||
 | 
							<field name="name">registrado</field>
 | 
				
			||||||
 | 
						        <field name="string">Registrado</field>
 | 
				
			||||||
 | 
							<field name="model" search="[('model', '=', 'taller.recepcion')]"/>
 | 
				
			||||||
	</record>
 | 
						</record>
 | 
				
			||||||
 | 
						<record model="ir.model.button" id="borrador_recepcion_button">
 | 
				
			||||||
 | 
							<field name="name">borrador</field>
 | 
				
			||||||
 | 
						        <field name="string">Borrador</field>
 | 
				
			||||||
 | 
							<field name="model" search="[('model', '=', 'taller.recepcion')]"/>
 | 
				
			||||||
 | 
						</record>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    </data>
 | 
					    </data>
 | 
				
			||||||
</tryton>
 | 
					</tryton>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -12,4 +12,14 @@ this repository contains the full copyright notices and license terms. -->
 | 
				
			|||||||
	<field name="hora_entrada"/>
 | 
						<field name="hora_entrada"/>
 | 
				
			||||||
	<label name="referencia"/>
 | 
						<label name="referencia"/>
 | 
				
			||||||
	<field name="referencia"/>
 | 
						<field name="referencia"/>
 | 
				
			||||||
 | 
						<newline />
 | 
				
			||||||
 | 
						<label name="descripcion"/>
 | 
				
			||||||
 | 
						<field name="descripcion"/>
 | 
				
			||||||
 | 
						<label name="state"/>
 | 
				
			||||||
 | 
						<field name="state"/>
 | 
				
			||||||
 | 
						<button name="registrado"/>
 | 
				
			||||||
 | 
						<button name="borrador"/>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						
 | 
				
			||||||
 | 
					
 | 
				
			||||||
</form>
 | 
					</form>
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user