Hello,
I've did a wizard/button which is changing discounts in every line. What I'm trying to do is to change it only in chosen lines? I've created selection boolean field before product name but there is a problem becouse when i click on it it not changing its status to true but opening the product wizard. What can i do to change this?
class add_selection_field_order(osv.osv): _inherit ='sale.order.line'
columns ={ 'selection_line':fields.boolean('zaznacz'), } _defaults = { 'selection_line': False, }
<record model="ir.ui.view" id="sale_order_add_selection_field"> <field name="name">sale.order.line_select_field</field> <field name="model">sale.order</field> <field name="inherit_id" ref="sale.view_order_form"/> <field name="arch" type="xml"> <xpath expr="//field[@name='th_weight'][@invisible='1']" position="after"> <field name="selection_line"/> </xpath> </field> </record>