changeset 3423f15dfcbd in modules/stock_package:default
details:
https://hg.tryton.org/modules/stock_package?cmd=changeset&node=3423f15dfcbd
description:
Add more information on stock move form
issue11768
review439591003
diffstat:
stock.py | 2 +-
stock.xml | 6 ++++++
view/stock_move_form.xml | 9 +++++++++
3 files changed, 16 insertions(+), 1 deletions(-)
diffs (41 lines):
diff -r 10098c7f2fe6 -r 3423f15dfcbd stock.py
--- a/stock.py Wed Sep 14 19:27:28 2022 +0200
+++ b/stock.py Sun Oct 09 19:07:16 2022 +0200
@@ -366,7 +366,7 @@
class Move(metaclass=PoolMeta):
__name__ = 'stock.move'
package = fields.Many2One(
- 'stock.package', "Package", select=True,
+ 'stock.package', "Package", select=True, readonly=True,
domain=[
('company', '=', Eval('company', -1)),
],
diff -r 10098c7f2fe6 -r 3423f15dfcbd stock.xml
--- a/stock.xml Wed Sep 14 19:27:28 2022 +0200
+++ b/stock.xml Sun Oct 09 19:07:16 2022 +0200
@@ -127,6 +127,12 @@
<field name="perm_delete" eval="True"/>
</record>
+ <record model="ir.ui.view" id="stock_move_view_form">
+ <field name="model">stock.move</field>
+ <field name="inherit" ref="stock.move_view_form"/>
+ <field name="name">stock_move_form</field>
+ </record>
+
<record model="ir.ui.view" id="shipment_out_view_form">
<field name="model">stock.shipment.out</field>
<field name="inherit" ref="stock.shipment_out_view_form"/>
diff -r 10098c7f2fe6 -r 3423f15dfcbd view/stock_move_form.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/view/stock_move_form.xml Sun Oct 09 19:07:16 2022 +0200
@@ -0,0 +1,9 @@
+<?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='origin']" position="after">
+ <label name="package"/>
+ <field name="package"/>
+ </xpath>
+</data>