Skip to content

Commit

Permalink
Merge pull request #1839 from Judystudy/master
Browse files Browse the repository at this point in the history
[IMP] 添加 core 模块 goods.py 测试数据
  • Loading branch information
GoodERPJeff committed Jun 21, 2018
2 parents 5758f4f + 4a9b063 commit 34aa604
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
3 changes: 3 additions & 0 deletions goods/tests/test_goods.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ def test_name_search(self):
result = self.env['goods'].name_search('001')
self.assertEqual(result, real_result)

# goods name_search code ilike name
self.env['goods'].name_search('00%')

def test_create(self):
'''导入商品时,如果辅助单位为空,则用计量单位来填充它'''
goods = self.env['goods'].create({
Expand Down
7 changes: 7 additions & 0 deletions sell/security/rules.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,12 @@
<field name='perm_create' eval='True'/>
<field name='perm_unlink' eval='True'/>
</record>

<record id="group_see_own_partner_rule" model="ir.rule">
<field name='name'>销售只能看自己的客户</field>
<field name='model_id' ref="core.model_partner"/>
<field name='domain_force'>['|', ('responsible_id','=',user.id), '|', ('responsible_id','=',False), ('share_id','=',user.id)]</field>
<field name='groups' eval="[(4,ref('sell.own_data_groups'))]"/>
</record>
</data>
</openerp>

0 comments on commit 34aa604

Please sign in to comment.