Compare commits
12 Commits
679cac31b3
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| f5f9a5fda9 | |||
| 57fa04784e | |||
| 64939ee99c | |||
| 166260707b | |||
| 43e32c3209 | |||
|
|
c38e7fbb32 | ||
| 43315bcdb4 | |||
| e62b4b50b7 | |||
| 830f65df91 | |||
|
|
dca30aa932 | ||
|
|
a97bf69aca | ||
|
|
77c5fd858e |
407
.gitignore
vendored
407
.gitignore
vendored
@@ -1,229 +1,218 @@
|
|||||||
# ---> Python
|
!*.svg # comment out if you don't need vector files
|
||||||
# Byte-compiled / optimized / DLL files
|
!.vscode/*.code-snippets
|
||||||
__pycache__/
|
!.vscode/extensions.json
|
||||||
*.py[cod]
|
!.vscode/launch.json
|
||||||
*$py.class
|
!.vscode/settings.json
|
||||||
*.bk
|
!.vscode/tasks.json
|
||||||
|
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
||||||
/.vscode
|
# For a library or package, you might want to ignore these files since the code is
|
||||||
|
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
||||||
# C extensions
|
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
||||||
*.so
|
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
||||||
|
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
||||||
# Distribution / packaging
|
# commonly ignored for libraries.
|
||||||
.Python
|
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
||||||
build/
|
# https://pdm.fming.dev/#use-with-ide
|
||||||
develop-eggs/
|
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
||||||
dist/
|
# in version control.
|
||||||
downloads/
|
# install all needed dependencies.
|
||||||
eggs/
|
# intended to run in multiple environments; otherwise, check them in:
|
||||||
.eggs/
|
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
|
||||||
lib/
|
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
||||||
lib64/
|
# Usually these files are written by a python script from a template
|
||||||
parts/
|
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
||||||
sdist/
|
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
||||||
var/
|
|
||||||
bin/
|
|
||||||
include/
|
|
||||||
wheels/
|
|
||||||
__pycache__
|
|
||||||
trytond_miac.egg-info/
|
|
||||||
pip-wheel-metadata/
|
|
||||||
share/python-wheels/
|
|
||||||
*.egg-info/
|
|
||||||
.installed.cfg
|
|
||||||
*.egg
|
|
||||||
MANIFEST
|
|
||||||
|
|
||||||
# PyInstaller
|
|
||||||
# Usually these files are written by a python script fkrom a template
|
|
||||||
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
||||||
*.manifest
|
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
||||||
*.spec
|
# -*- mode: gitignore; -*-
|
||||||
|
# ---> Emacs
|
||||||
|
# ---> Java
|
||||||
|
# ---> Python
|
||||||
|
# ---> Vim
|
||||||
|
# ---> VisualStudioCode
|
||||||
|
# .python-version
|
||||||
|
# AUCTeX auto folder
|
||||||
|
# Auto-generated tag files
|
||||||
|
# BlueJ files
|
||||||
|
# Built Visual Studio Code Extensions
|
||||||
|
# Byte-compiled / optimized / DLL files
|
||||||
|
# C extensions
|
||||||
|
# Celery stuff
|
||||||
|
# Compiled class file
|
||||||
|
# Cython debug symbols
|
||||||
|
# Distribution / packaging
|
||||||
|
# Django stuff:
|
||||||
|
# Environments
|
||||||
|
# Flask stuff:
|
||||||
|
# Flycheck
|
||||||
|
IPython
|
||||||
# Installer logs
|
# Installer logs
|
||||||
pip-log.txt
|
# Jupyter Notebook
|
||||||
pip-delete-this-directory.txt
|
# Local History for Visual Studio Code
|
||||||
|
# Log file
|
||||||
|
# Mobile Tools for Java (J2ME)
|
||||||
|
# Org-mode
|
||||||
|
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
||||||
|
# Package Files #
|
||||||
|
# Persistent undo
|
||||||
|
# PyBuilder
|
||||||
|
# PyCharm
|
||||||
|
# PyInstaller
|
||||||
|
# Pyre type checker
|
||||||
|
# Rope project settings
|
||||||
|
# SageMath parsed files
|
||||||
|
# Scrapy stuff:
|
||||||
|
# Session
|
||||||
|
# Sphinx documentation
|
||||||
|
# Spyder project settings
|
||||||
|
# Swap
|
||||||
|
# Temporary
|
||||||
|
# Translations
|
||||||
# Unit test / coverage reports
|
# Unit test / coverage reports
|
||||||
htmlcov/
|
# cask packages
|
||||||
.tox/
|
# directory configuration
|
||||||
.nox/
|
# elpa packages
|
||||||
|
# eshell files
|
||||||
|
# flymake-mode
|
||||||
|
# mkdocs documentation
|
||||||
|
# mypy
|
||||||
|
# network security
|
||||||
|
# pdm
|
||||||
|
# pipenv
|
||||||
|
# poetry
|
||||||
|
# projectiles files
|
||||||
|
pyenv
|
||||||
|
# pytype static type analyzer
|
||||||
|
# reftex files
|
||||||
|
# server auth directory
|
||||||
|
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
|
||||||
|
#.idea/
|
||||||
|
#Pipfile.lock
|
||||||
|
#pdm.lock
|
||||||
|
#poetry.lock
|
||||||
|
*$py.class
|
||||||
|
*.class
|
||||||
|
*.cover
|
||||||
|
*.ctxt
|
||||||
|
*.db
|
||||||
|
*.ear
|
||||||
|
*.egg
|
||||||
|
*.egg-info/
|
||||||
|
*.elc
|
||||||
|
*.jar
|
||||||
|
*.log
|
||||||
|
*.manifest
|
||||||
|
*.mo
|
||||||
|
*.nar
|
||||||
|
*.pot
|
||||||
|
*.py,cover
|
||||||
|
*.py[cod]
|
||||||
|
*.rar
|
||||||
|
*.rel
|
||||||
|
*.sage.py
|
||||||
|
*.so
|
||||||
|
*.spec
|
||||||
|
*.tar.gz
|
||||||
|
*.vsix
|
||||||
|
*.war
|
||||||
|
*.zip
|
||||||
|
*_archive
|
||||||
|
*_flymake.*
|
||||||
|
*~
|
||||||
|
.Python
|
||||||
|
.\#*
|
||||||
|
.cache
|
||||||
|
.cask/
|
||||||
.coverage
|
.coverage
|
||||||
.coverage.*
|
.coverage.*
|
||||||
.cache
|
.dir-locals.el
|
||||||
nosetests.xml
|
.dmypy.json
|
||||||
coverage.xml
|
.eggs/
|
||||||
*.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
|
.env
|
||||||
.venv
|
.history/
|
||||||
env/
|
.hypothesis/
|
||||||
venv/
|
.installed.cfg
|
||||||
ENV/
|
.ipynb_checkpoints
|
||||||
env.bak/
|
.mtj.tmp/
|
||||||
venv.bak/
|
.mypy_cache/
|
||||||
|
.netrwhist
|
||||||
# Spyder project settings
|
.nox/
|
||||||
|
.org-id-locations
|
||||||
|
.pdm.toml
|
||||||
|
.projectile
|
||||||
|
.pybuilder/
|
||||||
|
.pyre/
|
||||||
|
.pytest_cache/
|
||||||
|
.pytype/
|
||||||
|
.ropeproject
|
||||||
|
.scrapy
|
||||||
.spyderproject
|
.spyderproject
|
||||||
.spyproject
|
.spyproject
|
||||||
|
.tox/
|
||||||
# Rope project settings
|
.venv
|
||||||
.ropeproject
|
.venv/
|
||||||
|
.vscode/*
|
||||||
# mkdocs documentation
|
.web
|
||||||
/site
|
.webassets-cache
|
||||||
|
|
||||||
# mypy
|
|
||||||
.mypy_cache/
|
|
||||||
.dmypy.json
|
|
||||||
dmypy.json
|
|
||||||
|
|
||||||
# Pyre type checker
|
|
||||||
.pyre/
|
|
||||||
|
|
||||||
# ---> Emacs
|
|
||||||
# -*- mode: gitignore; -*-
|
|
||||||
*~
|
|
||||||
.~*
|
|
||||||
*#
|
|
||||||
\#*\#
|
|
||||||
/.emacs.desktop
|
/.emacs.desktop
|
||||||
/.emacs.desktop.lock
|
/.emacs.desktop.lock
|
||||||
*.elc
|
/auto/
|
||||||
auto-save-list
|
/elpa/
|
||||||
tramp
|
|
||||||
.\#*
|
|
||||||
|
|
||||||
# Org-mode
|
|
||||||
.org-id-locations
|
|
||||||
*_archive
|
|
||||||
|
|
||||||
# flymake-mode
|
|
||||||
*_flymake.*
|
|
||||||
|
|
||||||
# eshell files
|
|
||||||
/eshell/history
|
/eshell/history
|
||||||
/eshell/lastdir
|
/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
|
/network-security.data
|
||||||
|
/server/
|
||||||
|
/site
|
||||||
# ---> Vim
|
ENV/
|
||||||
# Swap
|
MANIFEST
|
||||||
|
Session.vim
|
||||||
|
Sessionx.vim
|
||||||
[._]*.s[a-v][a-z]
|
[._]*.s[a-v][a-z]
|
||||||
!*.svg # comment out if you don't need vector files
|
|
||||||
[._]*.sw[a-p]
|
[._]*.sw[a-p]
|
||||||
|
[._]*.un~
|
||||||
[._]s[a-rt-v][a-z]
|
[._]s[a-rt-v][a-z]
|
||||||
[._]ss[a-gi-z]
|
[._]ss[a-gi-z]
|
||||||
[._]sw[a-p]
|
[._]sw[a-p]
|
||||||
|
\#*\#
|
||||||
# Session
|
__pycache__/
|
||||||
Session.vim
|
__pypackages__/
|
||||||
Sessionx.vim
|
auto-save-list
|
||||||
|
build/
|
||||||
# Temporary
|
celerybeat-schedule
|
||||||
.netrwhist
|
celerybeat.pid
|
||||||
*~
|
cover/
|
||||||
# Auto-generated tag files
|
coverage.xml
|
||||||
|
cython_debug/
|
||||||
|
db.sqlite3
|
||||||
|
db.sqlite3-journal
|
||||||
|
develop-eggs/
|
||||||
|
dist/
|
||||||
|
dmypy.json
|
||||||
|
docs/_build/
|
||||||
|
downloads/
|
||||||
|
eggs/
|
||||||
|
env.bak/
|
||||||
|
env/
|
||||||
|
flycheck_*.el
|
||||||
|
hs_err_pid*
|
||||||
|
htmlcov/
|
||||||
|
instance/
|
||||||
|
ipython_config.py
|
||||||
|
lib/
|
||||||
|
lib64/
|
||||||
|
local_settings.py
|
||||||
|
nosetests.xml
|
||||||
|
parts/
|
||||||
|
pip-delete-this-directory.txt
|
||||||
|
pip-log.txt
|
||||||
|
profile_default/
|
||||||
|
replay_pid*
|
||||||
|
sdist/
|
||||||
|
share/python-wheels/
|
||||||
tags
|
tags
|
||||||
# Persistent undo
|
target/
|
||||||
[._]*.un~
|
tramp
|
||||||
|
var/
|
||||||
# ---> VirtualEnv
|
venv.bak/
|
||||||
# Virtualenv
|
wheels/
|
||||||
# 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
|
|
||||||
|
|
||||||
.tdd_cache
|
|
||||||
app
|
|
||||||
|
|
||||||
|
|||||||
35
locale/es.po
Normal file
35
locale/es.po
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
#
|
||||||
|
msgid ""
|
||||||
|
msgstr "Content-Type: text/plain; charset=utf-8\n"
|
||||||
|
|
||||||
|
msgctxt "field:sale.sale,delete_lines:"
|
||||||
|
msgid "Delete lines"
|
||||||
|
msgstr "Lineas Eliminadas"
|
||||||
|
|
||||||
|
msgctxt "field:sale.line_deleted,user:"
|
||||||
|
msgid "User"
|
||||||
|
msgstr "Usuario"
|
||||||
|
|
||||||
|
msgctxt "field:sale.line_deleted,sale:"
|
||||||
|
msgid "Sale"
|
||||||
|
msgstr "Venta"
|
||||||
|
|
||||||
|
msgctxt "field:sale.line_deleted,product:"
|
||||||
|
msgid "Product"
|
||||||
|
msgstr "Producto"
|
||||||
|
|
||||||
|
msgctxt "field:sale.line_deleted,unit:"
|
||||||
|
msgid "Unit"
|
||||||
|
msgstr "Unidad"
|
||||||
|
|
||||||
|
msgctxt "field:sale.line_deleted,quantity:"
|
||||||
|
msgid "Quantity"
|
||||||
|
msgstr "Cantidad"
|
||||||
|
|
||||||
|
msgctxt "field:sale.line_deleted,sale_date:"
|
||||||
|
msgid "Sale Date"
|
||||||
|
msgstr "Fecha Venta"
|
||||||
|
|
||||||
|
msgctxt "model:ir.ui.menu,name:menu_sale_line_deleted_form"
|
||||||
|
msgid "Sale Line Deleted"
|
||||||
|
msgstr "Linea de Venta Eliminadas"
|
||||||
64
sale.py
64
sale.py
@@ -1,6 +1,5 @@
|
|||||||
from trytond.pool import PoolMeta, Pool
|
from trytond.pool import PoolMeta, Pool
|
||||||
from trytond.model import fields, ModelSQL, ModelView
|
from trytond.model import fields, ModelSQL, ModelView
|
||||||
from trytond.pyson import Eval
|
|
||||||
from trytond.transaction import Transaction
|
from trytond.transaction import Transaction
|
||||||
|
|
||||||
|
|
||||||
@@ -8,32 +7,28 @@ class Sale(metaclass=PoolMeta):
|
|||||||
__name__ = 'sale.sale'
|
__name__ = 'sale.sale'
|
||||||
|
|
||||||
delete_lines = fields.One2Many(
|
delete_lines = fields.One2Many(
|
||||||
'sale.line_deleted',
|
'sale.line_deleted', 'sale', "Delete lines",
|
||||||
'sale',
|
|
||||||
"Delete lines",
|
|
||||||
states={
|
states={
|
||||||
'readonly': Eval('state') != 'draft'
|
'readonly': True
|
||||||
}
|
})
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
class SaleLine(metaclass=PoolMeta):
|
class SaleLine(metaclass=PoolMeta):
|
||||||
__name__ = 'sale.line'
|
__name__ = 'sale.line'
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def delete(cls, lines):
|
def _create_sale_line_deleted_log(cls, line):
|
||||||
pool = Pool()
|
pool = Pool()
|
||||||
SaleLineDeleted = pool.get('sale.line_deleted')
|
SaleLineDeleted = pool.get('sale.line_deleted')
|
||||||
for line in lines:
|
|
||||||
SaleLineDeleted.create([{
|
|
||||||
'sale': line.sale,
|
|
||||||
'quantity': line.quantity,
|
|
||||||
'unit': line.unit,
|
|
||||||
'product': line.product,
|
|
||||||
'user': Transaction().user
|
|
||||||
}])
|
|
||||||
|
|
||||||
super(SaleLine, cls).delete(lines)
|
SaleLineDeleted.create([{
|
||||||
|
'sale': line.sale,
|
||||||
|
'sale_date': line.sale_date,
|
||||||
|
'quantity': line.quantity,
|
||||||
|
'unit': line.unit,
|
||||||
|
'product': line.product,
|
||||||
|
'user': Transaction().user
|
||||||
|
}])
|
||||||
|
|
||||||
|
|
||||||
class SaleLineDeleted(ModelSQL, ModelView):
|
class SaleLineDeleted(ModelSQL, ModelView):
|
||||||
@@ -41,26 +36,23 @@ class SaleLineDeleted(ModelSQL, ModelView):
|
|||||||
|
|
||||||
__name__ = 'sale.line_deleted'
|
__name__ = 'sale.line_deleted'
|
||||||
|
|
||||||
|
_state = states = {
|
||||||
|
'readonly': True
|
||||||
|
}
|
||||||
|
|
||||||
sale = fields.Many2One(
|
sale = fields.Many2One(
|
||||||
'sale.sale', "Sale", ondelete='CASCADE', required=True
|
'sale.sale', "Sale", ondelete='CASCADE', required=True)
|
||||||
)
|
printed = fields.Boolean("Printed")
|
||||||
|
|
||||||
quantity = fields.Float(
|
quantity = fields.Float(
|
||||||
"Quantity", digits='unit',
|
"Quantity", digits='unit', states=_state)
|
||||||
# states={
|
unit = fields.Many2One(
|
||||||
# 'invisible': Eval('type') != 'line',
|
'product.uom', 'Unit', ondelete='RESTRICT', states=_state)
|
||||||
# 'required': Eval('type') == 'line',
|
product = fields.Many2One(
|
||||||
# 'readonly': Eval('sale_state') != 'draft',
|
'product.product', 'Product',
|
||||||
# }
|
ondelete='RESTRICT', states=_state)
|
||||||
|
sale_date = fields.Date(
|
||||||
|
'Sale Date',
|
||||||
|
states=_state
|
||||||
)
|
)
|
||||||
|
|
||||||
unit = fields.Many2One('product.uom', 'Unit', ondelete='RESTRICT',)
|
|
||||||
|
|
||||||
product = fields.Many2One('product.product', 'Product',
|
|
||||||
ondelete='RESTRICT',
|
|
||||||
)
|
|
||||||
sale_date = fields.Date('Sale Date',)
|
|
||||||
user = fields.Many2One(
|
user = fields.Many2One(
|
||||||
'res.user',
|
'res.user', 'User', states=_state)
|
||||||
'User'
|
|
||||||
)
|
|
||||||
|
|||||||
16
sale.xml
16
sale.xml
@@ -1,5 +1,11 @@
|
|||||||
<tryton>
|
<tryton>
|
||||||
<data>
|
<data>
|
||||||
|
<record model="ir.ui.view" id="sale_view_form">
|
||||||
|
<field name="model">sale.sale</field>
|
||||||
|
<field name="inherit" ref="sale.sale_view_form"/>
|
||||||
|
<field name="name">sale_form</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
<record model="ir.ui.view" id="sale_line_deleted_view_form">
|
<record model="ir.ui.view" id="sale_line_deleted_view_form">
|
||||||
<field name="model">sale.line_deleted</field>
|
<field name="model">sale.line_deleted</field>
|
||||||
<field name="type">form</field>
|
<field name="type">form</field>
|
||||||
@@ -32,7 +38,11 @@
|
|||||||
parent="sale.menu_sale"
|
parent="sale.menu_sale"
|
||||||
action="act_sale_line_deleted_form"
|
action="act_sale_line_deleted_form"
|
||||||
sequence="10"
|
sequence="10"
|
||||||
id="menu_sale_form"/>
|
id="menu_sale_line_deleted_form"/>
|
||||||
|
<record model="ir.ui.menu-res.group" id="menu_sale_group_sale">
|
||||||
|
<field name="menu" ref="menu_sale_line_deleted_form"/>
|
||||||
|
<field name="group" ref="sale.group_sale_admin"/>
|
||||||
|
</record>
|
||||||
|
|
||||||
</data>
|
</data>
|
||||||
</tryton>
|
</tryton>
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ Imports::
|
|||||||
|
|
||||||
Activate modules::
|
Activate modules::
|
||||||
|
|
||||||
>>> config = activate_modules('sale_line_delete_log')
|
>>> config = activate_modules('sale_line_delete_log')
|
||||||
|
|
||||||
Initial data::
|
Initial data::
|
||||||
|
|
||||||
@@ -179,7 +179,4 @@ Delete a sale line::
|
|||||||
>>> sale.delete_lines[0]
|
>>> sale.delete_lines[0]
|
||||||
proteus.Model.get('sale.line_deleted')(1)
|
proteus.Model.get('sale.line_deleted')(1)
|
||||||
>>> assert isinstance(sale.delete_lines[0], Model.get('sale.line_deleted')), "it's not instance SaleLineDeleted"
|
>>> assert isinstance(sale.delete_lines[0], Model.get('sale.line_deleted')), "it's not instance SaleLineDeleted"
|
||||||
|
;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
8
view/sale_form.xml
Normal file
8
view/sale_form.xml
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
<?xml version="1.0"?>
|
||||||
|
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||||
|
this repository contains the full copyright notices and license terms. -->
|
||||||
|
<data>
|
||||||
|
<xpath expr="//field[@name='lines']" position="after">
|
||||||
|
<field name="delete_lines" colspan="4"/>
|
||||||
|
</xpath>
|
||||||
|
</data>
|
||||||
@@ -15,5 +15,7 @@ this repository contains the full copyright notices and license terms. -->
|
|||||||
<field name="sale_date"/>
|
<field name="sale_date"/>
|
||||||
<label name="user"/>
|
<label name="user"/>
|
||||||
<field name="user"/>
|
<field name="user"/>
|
||||||
|
<label name="printed"/>
|
||||||
|
<field name="printed"/>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
|||||||
@@ -3,10 +3,10 @@
|
|||||||
this repository contains the full copyright notices and license terms. -->
|
this repository contains the full copyright notices and license terms. -->
|
||||||
|
|
||||||
<tree>
|
<tree>
|
||||||
<field name="sale"/>
|
<field name="user"/>
|
||||||
|
<field name="sale_date"/>
|
||||||
|
<field name="product"/>
|
||||||
<field name="quantity"/>
|
<field name="quantity"/>
|
||||||
<field name="unit"/>
|
<field name="unit"/>
|
||||||
<field name="product"/>
|
<field name="sale"/>
|
||||||
<field name="sale_date"/>
|
|
||||||
<field name="user"/>
|
|
||||||
</tree>
|
</tree>
|
||||||
|
|||||||
Reference in New Issue
Block a user