From 65d3cf45896a6a55ecf06b3e33bf8046dc8b973f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Sun, 19 Aug 2018 20:02:58 +0200 Subject: [PATCH] Use material design icons issue474 review60291002 --- bom.py | 2 +- icons/tryton-production.svg | 4 ++++ production.py | 10 +++++----- production.xml | 11 +++++++---- setup.py | 3 ++- view/production_form.xml | 6 +++--- 6 files changed, 22 insertions(+), 14 deletions(-) create mode 100644 icons/tryton-production.svg diff --git a/bom.py b/bom.py index 0109c80a8c..d0f89b7be2 100644 --- a/bom.py +++ b/bom.py @@ -248,7 +248,7 @@ class OpenBOMTree(Wizard): ]) tree = StateView('production.bom.tree.open.tree', 'production.bom_tree_open_tree_view_form', [ - Button('Change', 'start', 'tryton-go-previous'), + Button('Change', 'start', 'tryton-back'), Button('Close', 'end', 'tryton-close'), ]) diff --git a/icons/tryton-production.svg b/icons/tryton-production.svg new file mode 100644 index 0000000000..1ee229783a --- /dev/null +++ b/icons/tryton-production.svg @@ -0,0 +1,4 @@ + + + + diff --git a/production.py b/production.py index fc7fc50104..2592c2ae8d 100644 --- a/production.py +++ b/production.py @@ -185,8 +185,8 @@ class Production(Workflow, ModelSQL, ModelView): 'icon': If(Eval('state') == 'cancel', 'tryton-clear', If(Eval('state') == 'request', - 'tryton-go-next', - 'tryton-go-previous')), + 'tryton-forward', + 'tryton-back')), 'depends': ['state'], }, 'reset_bom': { @@ -198,10 +198,10 @@ class Production(Workflow, ModelSQL, ModelView): 'invisible': ~Eval('state').in_(['draft', 'assigned', 'waiting', 'running']), 'icon': If(Eval('state').in_(['assigned', 'running']), - 'tryton-go-previous', + 'tryton-back', If(Eval('state') == 'waiting', 'tryton-clear', - 'tryton-go-next')), + 'tryton-forward')), 'depends': ['state'], }, 'run': { @@ -651,7 +651,7 @@ class Assign(Wizard): start = StateTransition() failed = StateView('production.assign.failed', 'production.assign_failed_view_form', [ - Button('Force Assign', 'force', 'tryton-go-next', + Button('Force Assign', 'force', 'tryton-forward', states={ 'invisible': ~Id('stock', 'group_stock_force_assignment').in_( diff --git a/production.xml b/production.xml index 1aeee804bf..1c6cbc4aa8 100644 --- a/production.xml +++ b/production.xml @@ -31,16 +31,19 @@ this repository contains the full copyright notices and license terms. --> - + + tryton-production + icons/tryton-production.svg + + + - + diff --git a/setup.py b/setup.py index 8ade512383..239437f87c 100644 --- a/setup.py +++ b/setup.py @@ -72,7 +72,8 @@ setup(name=name, ], package_data={ 'trytond.modules.production': (info.get('xml', []) - + ['tryton.cfg', 'view/*.xml', 'locale/*.po', 'tests/*.rst']), + + ['tryton.cfg', 'view/*.xml', 'locale/*.po', 'tests/*.rst', + 'icons/*.svg']), }, classifiers=[ 'Development Status :: 5 - Production/Stable', diff --git a/view/production_form.xml b/view/production_form.xml index a841e797ff..f32869da2a 100644 --- a/view/production_form.xml +++ b/view/production_form.xml @@ -47,9 +47,9 @@ this repository contains the full copyright notices and license terms. -->