when a sales.order is confirmed (state = 'sale'), each sale.order.line, on that sale.order, creates a hr.job
I have an automatic action that executes python code when updating sale.order.
but im not sure how can i do it
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
when a sales.order is confirmed (state = 'sale'), each sale.order.line, on that sale.order, creates a hr.job
I have an automatic action that executes python code when updating sale.order.
but im not sure how can i do it
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign upRelated Posts | Replies | Views | Activity | |
---|---|---|---|---|
|
2
Jan 24
|
3668 | ||
|
0
Jun 23
|
939 | ||
|
1
Dec 22
|
1955 | ||
|
0
Apr 22
|
1398 | ||
|
2
Aug 20
|
2198 |
Im trying this
def function(self):
sales_line_obj = self.pool.get('sales.order.line')
for sale_line_id in record.sale_order_line_ids:
line = sales_line_obj.browse(cr, uid,order_id ,context=context)
#print line.name
job = client.model('hr.job').create({'name': name,
'x_campaign_id': x_campaign_id,
'x_product_id': x_product_id,
'x_product_qty': x_product_qty,
'department_id': department_id,
'address_id': address_id,
'no_of_recruitment': no_of_recruitment,
'survey_id': survey_id,
'user_id': user_id})
But it doesnt work, any help?