Feat:Se agrega vista a 'sale_form
This commit is contained in:
parent
7dab4ef9ce
commit
77c5fd858e
@ -6,3 +6,4 @@ depends:
|
|||||||
company
|
company
|
||||||
sale
|
sale
|
||||||
xml:
|
xml:
|
||||||
|
sale.xml
|
||||||
|
BIN
dist/trytondo_sale_line_delete_log-6.8.0-py3.11.egg
vendored
BIN
dist/trytondo_sale_line_delete_log-6.8.0-py3.11.egg
vendored
Binary file not shown.
3
sale.py
3
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
|
||||||
|
|
||||||
|
|
||||||
@ -12,7 +11,7 @@ class Sale(metaclass=PoolMeta):
|
|||||||
'sale',
|
'sale',
|
||||||
"Delete lines",
|
"Delete lines",
|
||||||
states={
|
states={
|
||||||
'readonly': Eval('state') != 'draft'
|
'readonly': True
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
8
sale.xml
8
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>
|
||||||
|
@ -6,11 +6,15 @@ README.rst
|
|||||||
setup.py
|
setup.py
|
||||||
./__init__.py
|
./__init__.py
|
||||||
./sale.py
|
./sale.py
|
||||||
|
./sale.xml
|
||||||
./tryton.cfg
|
./tryton.cfg
|
||||||
./tests/__init__.py
|
./tests/__init__.py
|
||||||
./tests/scenario_sale_line_delete_log.rst
|
./tests/scenario_sale_line_delete_log.rst
|
||||||
./tests/test_module.py
|
./tests/test_module.py
|
||||||
./tests/test_scenario.py
|
./tests/test_scenario.py
|
||||||
|
./view/sale_form.xml
|
||||||
|
./view/sale_line_deleted_form.xml
|
||||||
|
./view/sale_line_deleted_list.xml
|
||||||
doc/conf.py
|
doc/conf.py
|
||||||
doc/configuration.rst
|
doc/configuration.rst
|
||||||
doc/design.rst
|
doc/design.rst
|
||||||
|
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>
|
@ -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>
|
||||||
|
Loading…
Reference in New Issue
Block a user