Skip to content

Instantly share code, notes, and snippets.

@mrvdb
Created August 13, 2014 12:45
Show Gist options
  • Save mrvdb/a2fab1753c588f11e53b to your computer and use it in GitHub Desktop.
Save mrvdb/a2fab1753c588f11e53b to your computer and use it in GitHub Desktop.
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<!-- The tuple we are registering is company, product_category, income_account -->
<record forcecreate="True" id="property_account_income_categ" model="ir.property">
<!-- For all records, these are the same -->
<field name="name">property_account_income_categ</field>
<field name="fields_id" search="[('model','=','product.category'),('name','=','property_account_income_categ')]"/>
<!-- The company is different for each one obviously -->
<field name="company_id" ref="res_company.UK"/>
<!-- The value is the actual account
-->
<field eval="'account.account,'+str(ref('l10n_uk.4060'))" name="value"/>
<!-- The resource is which category the account applies to: -->
<field eval="'product.category,'+str(ref('product.product_category_masters'))" name="res_id" />
</record>
</data>
</openerp>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment