[TEST] add test for issue 1182111

bzr revid: alexandre.fayolle@camptocamp.com-20130521144418-x8pqpk632g3ew87j
This commit is contained in:
Alexandre Fayolle 2013-05-21 16:44:18 +02:00
parent 46b8c95d99
commit 68b3155d20
3 changed files with 25 additions and 0 deletions

View File

@ -94,6 +94,7 @@ Dashboard / Reports for Warehouse Management will include:
# 'test/opening_stock.yml',
# 'test/shipment.yml',
# 'test/stock_report.yml',
'test/multicompany.yml'
],
'installable': True,
'application': True,

View File

@ -287,6 +287,16 @@
<field name="company_id" ref="base.main_company"/>
</record>
<record id="multicompany_user" model="res.users">
<field name="name">multicomp</field>
<field name="login">multicomp</field>
<field name="password">multicomp</field>
<field name="company_id" ref="res_partner_company_2"/>
<field name="company_ids" eval="[(6,0,[ref('res_partner_company_2')])]"/>
<field name="groups_id" eval="[(6,0,[ref('base.group_user'), ref('stock.group_stock_manager')])]"/>
</record>
</data>
</openerp>

View File

@ -0,0 +1,14 @@
-
Set the current user as multicompany user
-
!context
'uid': 'stock.multicompany_user'
-
check no error on getting default stock.move values for internal move
-
!python {model: stock.move}:
context['picking_type'] = 'internal'
defaults = self.default_get(cr, uid, ['location_id', 'location_dest_id', 'type'], context)
assert defaults == {'location_id': False, 'location_dest_id': False, 'type': 'internal'}