Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- 客户关系管理
- e-Commerce
- 会计
- 库存
- PoS
- Project
- MRP
此问题已终结
1
回复
10595
查看
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
|
3897 | ||
|
2
1月 16
|
35722 | ||
|
4
9月 15
|
7052 | ||
|
1
8月 20
|
4787 | ||
|
1
4月 20
|
5321 |