Hello,

> In the Sales Order module, how do i add a subtotal discount

You'll have to create a function field subtotal eg :
'subtotal': fields.function(_amount_line, method=True, 
string='Subtotal', digits=(16,2)),

This field is calling a method : _amount_line
   def _amount_line(self, cr, uid, ids, field_name, arg, 
context):
      res = {}
      for line in self.browse(cr, uid, ids):
         res[line.id] = line.price * 
line.qty
      return res
where price and qty, in my example, are the price of the product and the 
quantity selected...

And then, in the _view.xml, you'll have to add <field> in the form definition 
part...

Eric





_______________________________________________
Tinyerp-users mailing list
http://tiny.be/mailman/listinfo/tinyerp-users

Reply via email to