123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114 |
- <?xml version="1.0" encoding="utf-8"?>
- <openerp>
- <data>
- <record id="calendar_birthday_search_view" model="ir.ui.view">
- <field name="name">calendar_birthday_search_view</field>
- <field name="model">res.partner.birthday</field>
- <field name="arch" type="xml">
- <search>
- <field name="partner_id" string="Socio"/>
- <field name="birthday_date" string="Fecha"/>
- <filter string="Mes pasado" domain="[('birthday_date','>=',(context_today()-relativedelta(months=1)).strftime('%%Y-%%m-01')),('birthday_date','<',time.strftime('%%Y-%%m-01'))]"/>
- <filter string="Mes actual" domain="[('birthday_date','<',(context_today()+relativedelta(months=1)).strftime('%%Y-%%m-01')), ('birthday_date','>=',time.strftime('%%Y-%%m-01'))]"/>
- <filter string="Mes siguiente" domain="[('birthday_date','>=', (context_today()+relativedelta(months=1)).strftime('%%Y-%%m-01')),('birthday_date','<=',(context_today()+relativedelta(months=2)).strftime('%%Y-%%m-01'))]"/>
- <filter string="Este año" name="this_year" domain="[('birthday_date','<',(context_today()+relativedelta(years=1)).strftime('%%Y-01-01')), ('birthday_date','>=',time.strftime('%%Y-01-01'))]"/>
- <group expand="0" string="Agrupar por:">
- <filter name="group_by_customer" string="Socio" context="{'group_by':'partner_id'}"/>
- <filter string="Mes" context="{'group_by':'birthday_date:month'}" help="Mes Creado"/>
- <filter string="Dia" context="{'group_by':'birthday_date:day'}" help="Dia Creado"/>
- </group>
- </search>
- </field>
- </record>
- <record id="birthday_calendar_form_view" model="ir.ui.view">
- <field name="name">birthday_calendar_form_view</field>
- <field name="model">res.partner.birthday</field>
- <field name="type">form</field>
- <field name="target">inline</field>
- <field name="flags">{'form': {'action_buttons': False}}</field>
- <field name="arch" type="xml">
- <form create="false" edit="false" delete="false">
- <script>
- $(document).ready(function(){
- $(".modal-footer").hide();
- });
- </script>
- <div class="row" style="margin-bottom:20px;">
- <div class="col-md-3" style="text-align:center;">
- <field name="partner_picture" widget="image"/>
- </div>
- <div class="col-md-6" style="text-align:center; font-size:large">
- <group>
- <field name="partner_id"/>
- <field name="partner_birthday" string="Fecha de nacimiento"/>
- <field name="partner_year_string"/>
- <button name="send_whatsapp_msg" type="object" class="oe_highlight" string="Enviar whatsapp"/>
- </group>
- </div>
- <div class="col-md-3" style="text-align:center;">
- <field name="photo" widget="image"/>
- </div>
- </div>
- </form>
- </field>
- </record>
- <record id="birthday_calendar" model="ir.ui.view">
- <field name="name">Calendario de Cumpleaños</field>
- <field name="model">res.partner.birthday</field>
- <field name="type">calendar</field>
- <field name="arch" type="xml">
- <calendar color="partner_id" quick_add="false" date_start="birthday_date" date_stop="birthday_date" string="Cumpleaños" avatar_model="res.partner" event_open_popup="%(birthday_calendar.birthday_calendar_form_view)s">
- <field name="partner_id"/>
- <field name="partner_year_string"/>
- </calendar>
- </field>
- </record>
- <record id="birthday_calendar_tree_view" model="ir.ui.view">
- <field name="name">birthday_calendar_tree_view</field>
- <field name="model">res.partner.birthday</field>
- <field name="type">tree</field>
- <field name="arch" type="xml">
- <tree create="false">
- <field name="partner_id"/>
- <field name="birthday_date"/>
- <field name="partner_year_string"/>
- </tree>
- </field>
- </record>
- <record id="action_birthday_calendar" model="ir.actions.act_window">
- <field name="name">Calendario de Cumpleaños</field>
- <field name="res_model">res.partner.birthday</field>
- <field name="view_mode">calendar</field>
- <field name="context">{'search_default_this_year':1}</field>
- <field name="help" type="html">
- <p class="oe_view_nocontent_create">
- </p>
- </field>
- </record>
- <record model="ir.actions.act_window.view" id="action_view_birthday_calendar">
- <field name="sequence" eval="2"/>
- <field name="view_mode">calendar</field>
- <field name="view_id" ref="birthday_calendar"/>
- <field name="act_window_id" ref="action_birthday_calendar"/>
- </record>
- <record model="ir.actions.act_window.view" id="action_view_birthday_tree">
- <field name="sequence" eval="3"/>
- <field name="view_mode">tree</field>
- <field name="view_id" ref="birthday_calendar_tree_view"/>
- <field name="act_window_id" ref="action_birthday_calendar"/>
- </record>
- <menuitem name="Calendario de Cumpleaños" id="menu_birthday_calendar" parent="base.menu_sales" action="birthday_calendar.action_birthday_calendar" sequence="100"/>
- </data>
- </openerp>
|