Skip to content

Instantly share code, notes, and snippets.

@nhomar
Last active August 29, 2015 14:05
Show Gist options
  • Select an option

  • Save nhomar/c4ac352ebd62a636017f to your computer and use it in GitHub Desktop.

Select an option

Save nhomar/c4ac352ebd62a636017f to your computer and use it in GitHub Desktop.
data_xml
<record id="{{ xml_id }}" model="ir.actions.act_window">
<field name="name">{{ action_name }}</field>
<field name="res_model">{{ model_name }}</field>
<field name="view_type">{{ }}</field>
<field name="view_id" ref="{{ xml_id_view }}"/>
<field name="context">{}</field>
<field name="search_view_id" ref="{{ xml_id_search_view }}"/>
<field name="view_mode">tree,form</field>
<field name="domain">[]</field>
<field name="help" type="html">
<p class="oe_view_nocontent_create">
Click to create a customer invoice.
</p>
</field>
</record>
<button name="%(action_view_account_statement_from_invoice_lines)d"
string="Import Invoices" type="action"
attrs="{'invisible':[('state','=','confirm')]}"/>
<?xml version='1.0' encoding='utf-8'?>
<openerp>
<data>
{% records %}
</data>
</openerp>
<section class="oe_container container">
<div class="oe_row oe_spaced row spaced">
<div class="oe_span12">
<h2 class="oe_slogan text-center">IFRS reports engine</h2>
<h3 class="oe_slogan text-muted text-center">Boost sales productivity, improve win rates, grow revenue</h3>
</div>
<div class="oe_span6 col-md-6 mt16">
<div class="oe_demo oe_picture oe_screenshot">
<a href="https://www.openerp.com">
<img class="img img-responsive shadow mb16" src="https://www.odoo.com/apps/modules/online/crm/crm_sc_01.png"/>
</a>
<div class="oe_demo_footer demo_footer oe_centeralign centeralign">Online Demo</div>
</div>
</div>
<div class="oe_span6 col-md-6 mt16">
<p class="oe_mt32 mt32">
Manage your sales funnel with no effort. Attract leads, follow-up on phone calls and meetings. Analyse the quality of your leads to make informed decisions and save time by integrating emails directly into the application.
</p>
<div class="oe_centeralign oe_websiteonly">
<a href="http://www.openerp.com/start?app=crm" class="oe_button oe_big oe_tacky tacky btn btn-danger">Start your
<span class="oe_emph">free</span> trial
</a>
</div>
</div>
</div>
</section>
<record id="group_account_invoice" model="res.groups">
<field name="name">Invoicing &amp; Payments</field>
<field name="category_id" ref="base.module_category_accounting_and_finance"/>
<field name="users" eval="[(4, ref('base.user_root'))]"/>
<field name="implied_ids" eval="[(4, ref('base.group_user'))]"/>
</record>
id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
access_product_product_account_user product.product.account.user product.model_product_product group_account_user 1 0 0 0
access_account_payment_term account.payment.term model_account_payment_term account.group_account_user 1 0 0 0
<record id="account_move_comp_rule" model="ir.rule">
<field name="name">Account Entry</field>
<field name="model_id" ref="model_account_move"/>
<field name="global" eval="True"/>
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
</record>
<field name="voucher_id" string="" widget="many2onebutton" options="{'label':{'create':'Reconcile','edit':'Edit Reconciliation'}}" context="{'line_type': type, 'default_type': amount &lt; 0 and 'payment' or 'receipt', 'type': amount &lt; 0 and 'payment' or 'receipt', 'default_partner_id': partner_id, 'default_journal_id': parent.journal_id, 'default_amount': abs(amount), 'default_reference': ref, 'default_date': date, 'default_name': name, 'default_active': False, 'account_id': account_id}"/>
<menuitem sequence="0" parent="{{ xml_id_paren t}}" action="{{ xml_id_action }}"/>
<record model="ir.module.category" id="module_category_hidden">
<field name="name">Technical Settings</field>
<field name="sequence">0</field>
<field name="visible" eval="0" />
</record>
<record id="{{ xml_id }}" model="{{ model }}">
<field name="{{ field_name }}">{% value %}</field>
<field name="{{ field_name }}">{% value %}</field>
</record>
<record id="{{ xml_id }}" model="ir.ui.view">
<field name="name">{{ short_name or 'model.name.form'}}</field>
<field name="model">{{ model }}</field>
<field name="arch" type="xml">
<form string="Invoice Line" version="7.0">
<sheet>
</sheet>
</form>
</field>
</record>
<record id="{{ xml_id }}" model="ir.ui.view">
<field name="name">{{ short_text_name }}</field>
<field name="model">{{ model }}</field>
<field name="inherit_id" ref="{{ module.xml_id }}"/>
<field name="arch" type="xml">
<xpath>
</xpath>
</field>
</record>
<record id="{{ xml_id }}" model="ir.ui.view">
<field name="name">{{ short_text_name }}</field>
<field name="model">{{ model }}</field>
<field name="arch" type="xml">
<tree colors="blue:state == 'draft';black:state in ('proforma','proforma2','open');gray:state == 'cancel'" string="Invoice">
<field name="partner_id" groups="base.group_user"/>
<field name="amount" sum="Total Amount"/>
<field name="audit" invisible="1"/>
</tree>
</field>
</record>
<xpath expr="//div[@name='import_buttons']" position="inside">
</xpath>
@nhomar
Copy link
Copy Markdown
Author

nhomar commented Aug 18, 2014

XML snnipets.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment