openerp - Adding multiple products in many2many field in custom module should convert into invoice lines -


i adding multiple products in field.now have 2 convert product list 1 one invoice lines automatically.i create button when click on create invoice automatically.but not able add invoice lines of product.

can me how add many products invoice lines 1 one.

you need call create method dicionary of values the id of current poduct:

@api.one def _add_to_invoice(self):    #you need pass the id of product invoice , add others      #fields    self.env['invoice'].create({'product_id',int(self.id),'field_one':your_value}) 

Comments

Popular posts from this blog

java - Suppress Jboss version details from HTTP error response -

gridview - Yii2 DataPorivider $totalSum for a column -

Sass watch command compiles .scss files before full sftp upload -