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

Hi Everyone, I was inherited some fields in product.category model and i want to show that some other fields on my other companies.. I am tried to give the answer on create function and Also tried on other Button But i can't write the values that i give in the main company to other companies.. Please Help me to find the Answer..

@api.model
def create(self, vals_list):
res = super(ProductCentralized, self).create(vals_list)
vals = []

vals.append({
'property_cost_method': res.property_cost_method,
'name':res.name,
'property_valuation': res.property_valuation,
'property_stock_valuation_account_id': res.property_stock_valuation_account_id,
'property_stock_journal': res.property_stock_journal,
'property_stock_account_input_categ_id': res.property_stock_account_input_categ_id,
'property_stock_account_output_categ_id': res.property_stock_account_output_categ_id,
})
res.sudo().create({'property_cost_method': self.property_cost_method,
'name': self.name,
'property_valuation': self.property_valuation,
'property_stock_valuation_account_id': self.property_stock_valuation_account_id,
'property_stock_journal': self.property_stock_journal,
'property_stock_account_input_categ_id': self.property_stock_account_input_categ_id,
'property_stock_account_output_categ_id': self.property_stock_account_output_categ_id})

return res

Please Help me to correct this code or using another button.. Thanks in Advance..

アバター
破棄
関連投稿 返信 ビュー 活動
2
7月 25
1955
3
7月 25
2374
1
7月 25
1627
3
11月 24
361
4
9月 24
3180