[MERGE] [IMP] warehouse/invoicing: minor usability improvements: hide group_by partner field when not necessary

bzr revid: tde@openerp.com-20130904144430-seei7on2rs8wk6mn
This commit is contained in:
Thibault Delavallée 2013-09-04 16:44:30 +02:00
commit 1b5d80d78d
5 changed files with 6 additions and 7 deletions

View File

@ -762,7 +762,7 @@
<!-- <button name="action_assign" states="confirmed" string="Check Availability" type="object"/> -->
<button name="force_assign" states="confirmed" string="Force Availability" type="object" class="oe_highlight" groups="base.group_user"/>
<button name="action_process" states="assigned" string="Confirm &amp; Transfer" groups="stock.group_stock_user" type="object" class="oe_highlight"/>
<button name="%(action_stock_invoice_onshipping)d" string="Create Invoice/Refund" attrs="{'invisible': ['|','|',('state','&lt;&gt;','done'),('invoice_state','=','invoiced'),('invoice_state','=','none')]}" type="action" class="oe_highlight" groups="base.group_user"/>
<button name="%(action_stock_invoice_onshipping)d" string="Create Invoice/Refund" attrs="{'invisible': ['|','|',('state','&lt;&gt;','done'),('invoice_state','=','invoiced'),('invoice_state','=','none')]}" context="{'group_field_invisible': True}" type="action" class="oe_highlight" groups="base.group_user"/>
<button name="%(act_stock_return_picking)d" string="Reverse Transfer" states="done" type="action" groups="base.group_user"/>
<button name="button_cancel" states="assigned,confirmed,draft" string="Cancel Transfer" groups="base.group_user"/>
<field name="state" widget="statusbar" statusbar_visible="draft,assigned,done" statusbar_colors='{"shipping_except":"red","invoice_except":"red","waiting_date":"blue"}'/>

View File

@ -93,9 +93,9 @@ class stock_invoice_onshipping(osv.osv_memory):
if pick.invoice_state != '2binvoiced':
count += 1
if len(active_ids) == 1 and count:
raise osv.except_osv(_('Warning!'), _('This picking list does not require invoicing.'))
raise osv.except_osv(_('Warning!'), _('This picking does not require invoicing.'))
if len(active_ids) == count:
raise osv.except_osv(_('Warning!'), _('None of these picking lists require invoicing.'))
raise osv.except_osv(_('Warning!'), _('None of these pickings require invoicing.'))
return res
def open_invoice(self, cr, uid, ids, context=None):
@ -146,5 +146,4 @@ class stock_invoice_onshipping(osv.osv_memory):
context=context)
return res
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -8,7 +8,7 @@
<form string="Create invoice" version="7.0">
<group string="Create Invoice">
<field name="journal_id"/>
<field name="group"/>
<field name="group" invisible="context.get('group_field_invisible', False)"/>
<field name="invoice_date" />
</group>
<footer>

View File

@ -23,7 +23,7 @@
<separator string="Products"/>
<field name="move_ids"/>
<footer>
<button name="do_partial" string="_Validate" type="object" class="oe_highlight"/>
<button name="do_partial" string="_Validate" type="object" class="oe_highlight" context="{'group_field_invisible': True}"/>
or
<button string="Cancel" class="oe_link" special="cancel" />
</footer>

View File

@ -31,7 +31,7 @@
</tree>
</field>
<footer>
<button name="do_partial" string="_Transfer" type="object" class="oe_highlight"/>
<button name="do_partial" string="_Transfer" type="object" class="oe_highlight" context="{'group_field_invisible': True}"/>
or
<button string="Cancel" class="oe_link" special="cancel" />
</footer>