File tree Expand file tree Collapse file tree 2 files changed +19
-11
lines changed
account_invoice_line_second_quantity Expand file tree Collapse file tree 2 files changed +19
-11
lines changed Original file line number Diff line number Diff line change 20
20
###############################################################################
21
21
22
22
from openerp import fields , models , api , _
23
+ import openerp .addons .decimal_precision as dp
23
24
24
25
class account_invoice_line (models .Model ):
25
26
_inherit = 'account.invoice.line'
26
27
27
- second_quantity = fields .Float ('Second Quantity' )
28
+ second_quantity = fields .\
29
+ Float ('Second Quantity' ,
30
+ digits = dp .get_precision ('Product Unit of Measure' ))
28
31
second_uom_id = fields .Many2one ('product.uom' , 'Second UoM' )
29
32
30
33
@api .onchange ('second_uom_id' )
Original file line number Diff line number Diff line change 1
1
<?xml version =" 1.0" encoding =" utf-8" ?>
2
2
<openerp >
3
- <data >
3
+ <data >
4
4
5
5
<record id =" view_invoice_line_form" model =" ir.ui.view" >
6
6
<field name =" name" >account.invoice.line.form</field >
7
7
<field name =" model" >account.invoice.line</field >
8
8
<field name =" inherit_id" ref =" account.view_invoice_line_form" />
9
9
<field name =" arch" type =" xml" >
10
- <field name =" price_unit" position =" after" >
11
- <label string =" Second Quantity :" align =" 1.0" />
12
- <group colspan =" 1" col =" 2" >
13
- <field name =" second_quantity" nolabel =" 1" colspan =" 1" />
14
- <field name =" second_uom_id" nolabel =" 1" colspan =" 1" />
15
- </group >
16
- </field >
17
- </field >
10
+ <field name =" price_unit" position =" after" >
11
+ <label for =" second_quantity" />
12
+ <div >
13
+ <field name =" second_quantity" class =" oe_inline" />
14
+ <field name =" second_uom_id" class =" oe_inline" />
15
+ </div >
16
+ <!-- <label string="Second Quantity :" align="1.0"/>
17
+ <div colspan="1" col="2">
18
+ <field name="second_quantity" nolabel="1" colspan="1"/>
19
+ <field name="second_uom_id" nolabel="1" colspan="1"/>
20
+ </div>-->
21
+ </field >
22
+ </field >
18
23
</record >
19
24
20
- </data >
25
+ </data >
21
26
</openerp >
You can’t perform that action at this time.
0 commit comments