Horje
odoo - add one2many field programmatically Code Example
odoo - add one2many field programmatically
def action_create_estimation_lines(self):
  default_fases = ['Analysis','Functional Design','Development','Testing', 'Server Push']
  count = 1
  estimation_lines = []

  for fase in default_fases:
    estimation_line = {'analyse_line_id':self.id,'name':fase,'sequence':count}
    count = count + 1
    estimation_lines.append((0,0, estimation_line))
  self.estimation_line_ids = estimation_lines




Python

Related
what is a rare earth Code Example what is a rare earth Code Example
airflow set ui color of operator ui_color Code Example airflow set ui color of operator ui_color Code Example
replicate python Code Example replicate python Code Example
if elif and else in python Code Example if elif and else in python Code Example
fibonacci series using for loop in python Code Example fibonacci series using for loop in python Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
7