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!
Registrar-seRelated Posts | Respostes | Vistes | Activitat | |
---|---|---|---|---|
|
2
de gen. 24
|
5467 | ||
|
0
de juny 23
|
2061 | ||
|
1
de des. 22
|
3381 | ||
|
0
d’abr. 22
|
2604 | ||
|
2
d’ag. 20
|
2949 |
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?