120 lines
5.8 KiB
XML
120 lines
5.8 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<openerp>
|
|
<data>
|
|
<!-- menu Administration/Portals -->
|
|
<menuitem name="Portals" id="portal_menu" parent="base.menu_administration"
|
|
groups="group_portal_manager"/>
|
|
|
|
<!-- menu Administration/Portals/Portals -->
|
|
<record id="portal_list_action" model="ir.actions.act_window">
|
|
<field name="name">Portals</field>
|
|
<field name="res_model">res.portal</field>
|
|
<field name="view_type">form</field>
|
|
<field name="view_mode">tree,form</field>
|
|
<!-- a context is necessary to get the right portal form view -->
|
|
<field name="context">{'form_view_ref': 'portal.portal_form_view'}</field>
|
|
<field name="help">
|
|
A portal helps defining specific views and rules for a group of users (the
|
|
portal group). A portal menu, widgets and specific groups may be assigned to
|
|
the portal's users.
|
|
</field>
|
|
</record>
|
|
<menuitem name="Portals" id="portal_list_menu"
|
|
parent="portal_menu" sequence="1" action="portal_list_action"/>
|
|
|
|
<!-- portal tree view -->
|
|
<record id="portal_list_view" model="ir.ui.view">
|
|
<field name="name">Portal List</field>
|
|
<field name="model">res.portal</field>
|
|
<field name="type">tree</field>
|
|
<field name="arch" type="xml">
|
|
<tree string="Portals">
|
|
<field name="name" string="Portal Name"/>
|
|
</tree>
|
|
</field>
|
|
</record>
|
|
|
|
<!-- portal form view -->
|
|
<record id="portal_form_view" model="ir.ui.view">
|
|
<field name="name">Portal Form</field>
|
|
<field name="model">res.portal</field>
|
|
<field name="type">form</field>
|
|
<field name="inherit_id" ref="base.view_groups_form"/>
|
|
<field name="arch" type="xml">
|
|
<page string="Users" position="before">
|
|
<page string="Portal">
|
|
<group colspan="4" col="2">
|
|
<separator string="Website" colspan="2"/>
|
|
<field name="url" widget="url"/>
|
|
</group>
|
|
<group colspan="2" col="2">
|
|
<separator string="Widgets assigned to Users" colspan="2"/>
|
|
<field name="widget_ids" nolabel="1" colspan="2">
|
|
<tree string="Widgets" editable="bottom">
|
|
<field name="sequence"/>
|
|
<field name="widget_id"/>
|
|
</tree>
|
|
</field>
|
|
</group>
|
|
<group colspan="2" col="2">
|
|
<separator string="Portal Menu" colspan="2"/>
|
|
<field name="override_menu"/>
|
|
<field name="parent_menu_id"
|
|
context="{'ir.ui.menu.full_list': True}"/>
|
|
<label colspan="1"/>
|
|
<button name="do_create_menu" type="object"
|
|
string="Create Parent Menu"/>
|
|
<field name="home_action_id"/>
|
|
</group>
|
|
</page>
|
|
</page>
|
|
</field>
|
|
</record>
|
|
|
|
<record model="ir.ui.view" id="product.product_kanban_view">
|
|
<field name="name">Product Kanban</field>
|
|
<field name="model">product.product</field>
|
|
<field name="type">kanban</field>
|
|
<field name="arch" type="xml">
|
|
<kanban>
|
|
<field name="color"/>
|
|
<field name="type"/>
|
|
<field name="product_image"/>
|
|
<field name="list_price"/>
|
|
<templates>
|
|
<t t-name="kanban-box">
|
|
<div class="oe_product_vignette">
|
|
<div class="oe_product_img">
|
|
<a type="edit"><img t-att-src="kanban_image('product.product', 'product_image', record.id.value)" class="oe_product_photo"/></a>
|
|
</div>
|
|
<div class="oe_product_desc">
|
|
<h4><a type="edit"><field name="name"></field></a></h4>
|
|
<ul>
|
|
<li t-if="record.type.raw_value != 'service'">Stock on hand: <field name="qty_available"/> <field name="uom_id"/></li>
|
|
<li t-if="record.type.raw_value != 'service'">Stock available: <field name="virtual_available"/> <field name="uom_id"/></li>
|
|
<li>Price: <field name="lst_price"></field></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<script>
|
|
$('.oe_product_photo').load(function() { if($(this).width() > $(this).height()) { $(this).addClass('oe_product_photo_wide') } });
|
|
</script>
|
|
<div></div>
|
|
</t>
|
|
</templates>
|
|
</kanban>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="action_contact_us" model="ir.actions.act_window">
|
|
<field name="name">Contact Us</field>
|
|
<field name="res_model">res.company</field>
|
|
<field name="type">ir.actions.act_window</field>
|
|
<field name="view_type">form</field>
|
|
<field name="view_mode">form,tree</field>
|
|
<field name="domain">[]</field>
|
|
<field name="view_id" ref="base.view_company_form" />
|
|
</record>
|
|
</data>
|
|
</openerp>
|