Make description on purchase requisition line optional
issue6860 review38971002
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
* Make description on purchase requisition line optional
|
||||
|
||||
Version 4.6.0 - 2017-10-30
|
||||
* Bug fixes (see mercurial logs for details)
|
||||
|
||||
@@ -5,4 +7,4 @@ Version 4.4.0 - 2017-05-01
|
||||
* Bug fixes (see mercurial logs for details)
|
||||
|
||||
Version 4.2.0 - 2016-11-28
|
||||
* Initial release
|
||||
* Initial release
|
||||
|
||||
+2
-8
@@ -423,13 +423,7 @@ class PurchaseRequisitionLine(sequence_ordered(), ModelSQL, ModelView):
|
||||
('purchasable', '=', True),
|
||||
],
|
||||
states=_states, depends=_depends)
|
||||
description = fields.Text(
|
||||
'Description',
|
||||
states={
|
||||
'readonly': _states['readonly'],
|
||||
'required': ~Eval('product')
|
||||
},
|
||||
depends=['product'] + _depends)
|
||||
description = fields.Text("Description", states=_states, depends=_depends)
|
||||
quantity = fields.Float(
|
||||
'Quantity', digits=(16, Eval('unit_digits', 2)), required=True,
|
||||
states=_states, depends=['unit_digits'] + _depends)
|
||||
@@ -470,7 +464,7 @@ class PurchaseRequisitionLine(sequence_ordered(), ModelSQL, ModelView):
|
||||
if self.requisition:
|
||||
return self.requisition.state
|
||||
|
||||
@fields.depends('product', 'unit', 'quantity', 'description', 'supplier')
|
||||
@fields.depends('product', 'unit', 'quantity', 'supplier')
|
||||
def on_change_product(self):
|
||||
if not self.product:
|
||||
return
|
||||
|
||||
@@ -12,8 +12,6 @@ this repository contains the full copyright notices and license terms. -->
|
||||
<field name="product" view_ids="purchase.product_view_list_purchase_line"/>
|
||||
<label name="supplier"/>
|
||||
<field name="supplier"/>
|
||||
<label name="description"/>
|
||||
<field name="description" colspan="3" yexpand="0"/>
|
||||
<label name="quantity"/>
|
||||
<field name="quantity"/>
|
||||
<label name="unit"/>
|
||||
@@ -22,6 +20,8 @@ this repository contains the full copyright notices and license terms. -->
|
||||
<field name="unit_price"/>
|
||||
<label name="amount"/>
|
||||
<field name="amount"/>
|
||||
<separator name="description" colspan="4"/>
|
||||
<field name="description" colspan="4"/>
|
||||
</page>
|
||||
</notebook>
|
||||
</form>
|
||||
|
||||
@@ -5,7 +5,6 @@ this repository contains the full copyright notices and license terms. -->
|
||||
<field name="requisition"/>
|
||||
<field name="product"/>
|
||||
<field name="supplier"/>
|
||||
<field name="description"/>
|
||||
<field name="quantity"/>
|
||||
<field name="unit"/>
|
||||
<field name="unit_price"/>
|
||||
|
||||
@@ -5,7 +5,6 @@ this repository contains the full copyright notices and license terms. -->
|
||||
<field name="requisition"/>
|
||||
<field name="product"/>
|
||||
<field name="supplier"/>
|
||||
<field name="description"/>
|
||||
<field name="quantity"/>
|
||||
<field name="unit"/>
|
||||
<field name="unit_price"/>
|
||||
|
||||
@@ -4,7 +4,6 @@ this repository contains the full copyright notices and license terms. -->
|
||||
<tree>
|
||||
<field name="number"/>
|
||||
<field name="supply_date"/>
|
||||
<field name="description"/>
|
||||
<field name="employee"/>
|
||||
<field name="warehouse"/>
|
||||
<field name="total_amount"/>
|
||||
|
||||
Reference in New Issue
Block a user