[MERGE] merged few enhancements related to event* modules (better demo data in event_sale + new module to fix incompatibility with event_sale and sale_layout modules)

bzr revid: qdp-launchpad@openerp.com-20120312120145-2ahlt8jnh9pm1p1w
This commit is contained in:
Quentin (OpenERP) 2012-03-12 13:01:45 +01:00
commit 16c9a25c0d
5 changed files with 105 additions and 0 deletions

View File

@ -37,6 +37,7 @@ It defines a new kind of service products that offers you the possibility to cho
'depends': ['event','sale','sale_crm'],
'update_xml': [
'event_sale_view.xml',
'event_demo.xml',
],
'test':['test/confirm.yml'],
'installable': True,

View File

@ -0,0 +1,25 @@
<?xml version="1.0"?>
<openerp>
<data>
<record id="event_technical_training" model="event.event">
<field name="name">Technical training in Grand-Rosiere</field>
<field eval="(DateTime.now() + timedelta(15)).strftime('%Y-%m-%d 7:00:00')" name="date_begin"/>
<field eval="(DateTime.now() + timedelta(20)).strftime('%Y-%m-%d 16:00:00')" name="date_end"/>
<field name="type" ref="event.event_type_4"/>
<field name="user_id" ref="base.user_root"/>
</record>
<record id="event_product" model="product.product">
<field name="name">Technical Training</field>
<field name="event_ok">True</field>
<field name="event_type_id" ref="event.event_type_4"/>
<field name="categ_id" ref="product.cat1"/>
<field name="type">service</field>
<field name="list_price">2500.0</field>
<field name="standard_price">1000.0</field>
<field name="supply_method">produce</field>
<field name="uom_id" ref="product.product_uom_unit"/>
<field name="uom_po_id" ref="product.product_uom_unit"/>
</record>
</data>
</openerp>

View File

@ -0,0 +1,21 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################

View File

@ -0,0 +1,40 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
{
'name': 'Events Sales layout',
'version': '0.1',
'category': 'Tools',
'complexity': "easy",
'description': """
This module ensures the compatibility of the changes made on the sale.order.line form view in event_sale with the sale_layout module (that is replacing the whole field in the view by another one). Its installation is automatically triggered when both modules are installed.
""",
'author': 'OpenERP SA',
'depends': ['event_sale','sale_layout'],
'update_xml': [
'event_sale_layout.xml',
],
'installable': True,
'auto_install':True,
'category': 'Hidden',
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -0,0 +1,18 @@
<openerp>
<data>
<record model="ir.ui.view" id="view_order_form_inherit_1">
<field name="name">event.sale.order</field>
<field name="model">sale.order</field>
<field name="type">form</field>
<field name="priority">10000</field>
<field name="inherit_id" ref="sale.view_order_form" />
<field name="arch" type="xml">
<xpath expr="//field[@name='discount']" position="after">
<field name="event_id" colspan="3" domain="[('type', 'in', list(set((event_type_id,False))))]" attrs="{'invisible': [('event_ok', '=', False)],'required': [('event_ok', '!=', False)]}"/>
<field name="event_type_id" invisible='1'/>
<field name="event_ok" invisible='1'/>
</xpath>
</field>
</record>
</data>
</openerp>