Browse Source

[FIX] emca: add subscription demo journal

pull/116/head
robin.keunen 5 years ago
parent
commit
251eea133a
  1. 8
      easy_my_coop/demo/coop.xml
  2. 4
      easy_my_coop/tests/test_base.py
  3. 12
      easy_my_coop_api/demo/demo.xml

8
easy_my_coop/demo/coop.xml

@ -77,8 +77,8 @@
</record> </record>
<record id="account_equity_demo" model="account.account"> <record id="account_equity_demo" model="account.account">
<field name="name">Equity</field>
<field name="code">100910</field> <field name="code">100910</field>
<field name="name">Variable Capital</field>
<field eval="True" name="reconcile"/> <field eval="True" name="reconcile"/>
<field name="user_type_id" ref="account.data_account_type_equity"/> <field name="user_type_id" ref="account.data_account_type_equity"/>
</record> </record>
@ -88,9 +88,9 @@
ref="account_cooperator_demo"/> ref="account_cooperator_demo"/>
</record> </record>
<record id="base.main_company" model="res.company">
<field name="property_cooperator_account"
ref="account_cooperator_demo"/>
<record id="subscription_journal" model="account.journal">
<field name="default_credit_account_id" ref="account_equity_demo"/>
<field name="default_debit_account_id" ref="account_equity_demo"/>
</record> </record>
<record id="product_template_share_type_1_demo" model="product.template"> <record id="product_template_share_type_1_demo" model="product.template">

4
easy_my_coop/tests/test_base.py

@ -8,10 +8,6 @@ import odoo.tests.common as common
class EMCBaseCase(common.TransactionCase): class EMCBaseCase(common.TransactionCase):
def setUp(self): def setUp(self):
super(EMCBaseCase, self).setUp() super(EMCBaseCase, self).setUp()
# todo set from demo data
user = self.env["res.users"].browse(self.uid)
cooperator_account = self.ref("easy_my_coop.account_cooperator_demo")
user.company_id.property_cooperator_account = cooperator_account
def as_user(self): def as_user(self):
self.uid = self.ref("base.user_demo") self.uid = self.ref("base.user_demo")

12
easy_my_coop_api/demo/demo.xml

@ -9,10 +9,10 @@
<field name="key">cbd07f57-c903-43b4-b668-436b3bec5f15</field> <field name="key">cbd07f57-c903-43b4-b668-436b3bec5f15</field>
</record> </record>
<record id="easy_my_coop.subscription_request_1_demo" model="subscription.request">
<field name="external_id">1</field>
</record>
<record id="easy_my_coop.subscription_request_2_demo" model="subscription.request">
<field name="external_id">2</field>
</record>
<!-- <record id="easy_my_coop.subscription_request_1_demo" model="subscription.request">-->
<!-- <field name="_external_id">1</field>-->
<!-- </record>-->
<!-- <record id="easy_my_coop.subscription_request_2_demo" model="subscription.request">-->
<!-- <field name="_external_id">2</field>-->
<!-- </record>-->
</odoo> </odoo>
Loading…
Cancel
Save