コンテンツへスキップ
メニュー
この質問にフラグが付けられました
2965 ビュー

class modelA(models.Model):

_name='model.a'

code = fields.Char('Description: ')

subject =   fields.Char('Subject: ')

def action_button(self):

data = {

'ids': self.ids,
'model': 'stock.move',
'form': self.read(['start_date', 'end_date', 'route', 'salesman'])[0]

}

#code to pass data

return ?


class modelB(models.Model):

_name='model.b'

def print_data(self,code,subject):

x = (code,subject)

return x


How can i pass the  field values from class A to B? Thank u in advance for the help :)


アバター
破棄
関連投稿 返信 ビュー 活動
3
11月 24
30884
1
12月 21
3190
0
12月 21
2756
0
4月 15
5080
2
3月 15
10814