Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- 会計
- 在庫
- PoS
- Project
- MRP
この質問にフラグが付けられました
1
返信
10435
ビュー
Hi,
vals is a dictionary containing the values to create a new record or write to a record in the model.
I hope you are working in Odoo 8 new api.
In that case, if you want to override create():
eg:
class AccountJournal(models.Model):
_inherit = "account.journal"
@api.model
def create(self, vals):
rec_id = super(AccountJournal, self).create(vals)
...
... #do your stuff
return rec_id
and for write():
eg:
class AccountJournal(models.Model):
_inherit = "account.journal"
@api.multi
def write(self, vals):
res = super(AccountJournal, self).write(vals)
...
... #do your stuff
return res
Hope this helps
関連投稿 | 返信 | ビュー | 活動 | |
---|---|---|---|---|
|
0
9月 17
|
3749 | ||
|
2
1月 16
|
35553 | ||
|
4
9月 15
|
6937 | ||
|
1
8月 20
|
4643 | ||
|
1
4月 20
|
5164 |