~camptocamp/margin-analysis/7.0-product_price_history-index-1301847

« back to all changes in this revision

Viewing changes to product_historical_margin/account_invoice_view.xml

[MRG] Port of product_historical_margin to v7.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
<?xml version="1.0" encoding="utf-8"?>
2
2
<openerp>
3
3
  <data>
4
 
      
5
 
       <record id="view_invoice_line_tree_from_product" model="ir.ui.view">
6
 
              <field name="name">account.invoice.line.from.product.tree</field>
7
 
              <field name="model">account.invoice.line</field>
8
 
              <field name="type">tree</field>
9
 
              <field name="priority">20</field>
10
 
              <field name="arch" type="xml">
11
 
                  <tree string="Invoice Line">
12
 
                      <field name="invoice_type"/>
13
 
                      <field name="partner_id"/>
14
 
                      <field name="invoice_user_id"/>
15
 
                      <field name="invoice_id"/>
16
 
                      <field name="invoice_date"/>
17
 
                      <field name="name" invisible="1"/>
18
 
                      <field name="product_id"/>
19
 
                      <field name="account_id" invisible="1"/>
20
 
                      <field name="quantity"/>
21
 
                      <field name="uos_id"/>
22
 
                      <field name="price_unit" invisible="1"/>
23
 
                      <field name="discount" invisible="1"/>
24
 
                      <field name="price_subtotal" invisible="1"/>
25
 
                      <field name="subtotal_cost_price" invisible="1"/>
26
 
                      <field name="company_id" invisible="1"/>
27
 
                      <field name="subtotal_company"/>
28
 
                      <field name="subtotal_cost_price_company"/>
29
 
                      <field name="margin_absolute"/>
30
 
                      <field name="margin_relative" invisible="context.get('group_by',False)"/>
31
 
                  </tree>
32
 
              </field>
33
 
          </record>
34
 
          
35
 
        
36
 
      <record id="view_account_invoice_line_filter" model="ir.ui.view">
37
 
          <field name="name">account.invoice.line.select</field>
38
 
          <field name="model">account.invoice.line</field>
39
 
          <field name="type">search</field>
40
 
          <field name="arch" type="xml">
41
 
              <search string="Search Invoice Line">
42
 
                 <group>
43
 
                     <filter icon="terp-go-year" string="Year" 
44
 
                             name="year"
45
 
                             domain="[('invoice_date','&lt;=', time.strftime('%%Y-%%m-%%d')),('invoice_date','&gt;=',time.strftime('%%Y-01-01'))]"
46
 
                             help="year"/>
47
 
                     <separator orientation="vertical"/>
48
 
                     <filter icon="terp-go-month" string="Month"
49
 
                             name="month"
50
 
                             domain="[('invoice_date','&lt;=',(datetime.date.today()+relativedelta(day=31)).strftime('%%Y-%%m-%%d')),('invoice_date','&gt;=',(datetime.date.today()-relativedelta(day=1)).strftime('%%Y-%%m-%%d'))]"
51
 
                             help="current month"/>
52
 
                     <filter icon="terp-go-month" string="Month-1"
53
 
                             domain="[('invoice_date','&lt;=', (datetime.date.today() - relativedelta(day=31, months=1)).strftime('%%Y-%%m-%%d')),('invoice_date','&gt;=',(datetime.date.today() - relativedelta(day=1,months=1)).strftime('%%Y-%%m-%%d'))]"
54
 
                             help="last month"/>
55
 
                     <separator orientation="vertical"/>
56
 
                      <field name="product_id"/>
57
 
                      <field name="invoice_type"/>
58
 
                      <field name="partner_id"/>
59
 
                      <field name="invoice_user_id"/>
60
 
                      <field name="invoice_date"/>
61
 
                      <field name="account_id"/>
62
 
                      <field name="company_id"/>
63
 
                  </group>
64
 
                  <newline/>
65
 
                  <group expand="1" string="Group By...">
66
 
                      <filter string="Partner" icon="terp-partner" domain="[]" context="{'group_by':'partner_id'}"/>
67
 
                      <filter string="Salesman" name='user' icon="terp-personal" context="{'group_by':'invoice_user_id'}"/>
68
 
                      <separator orientation="vertical"/>
69
 
                      <filter string="Account" icon="terp-folder-orange" domain="[]" context="{'group_by':'account_id'}"/>
70
 
                      <filter string="Invoice" icon="terp-folder-orange" domain="[]" context="{'group_by':'invoice_id'}"/>
71
 
                      <separator orientation="vertical"/>
72
 
                      <filter string="Invoice Type" icon="terp-stock_effects-object-colorize" domain="[]"  context="{'group_by':'invoice_type'}"/>
73
 
                      <filter name="product" string="Product" icon="terp-accessories-archiver" context="{'group_by':'product_id'}"/>
74
 
                  </group>
75
 
             </search>
76
 
          </field>
77
 
      </record>
 
4
 
 
5
    <record id="view_invoice_line_tree_from_product" model="ir.ui.view">
 
6
      <field name="name">account.invoice.line.from.product.tree</field>
 
7
      <field name="model">account.invoice.line</field>
 
8
      <field name="type">tree</field>
 
9
      <field name="priority">20</field>
 
10
      <field name="arch" type="xml">
 
11
        <tree string="Invoice Line">
 
12
          <field name="invoice_type"/>
 
13
          <field name="partner_id"/>
 
14
          <field name="invoice_user_id"/>
 
15
          <field name="invoice_id"/>
 
16
          <field name="invoice_date"/>
 
17
          <field name="name" invisible="1"/>
 
18
          <field name="product_id"/>
 
19
          <field name="account_id" invisible="1"/>
 
20
          <field name="quantity"/>
 
21
          <field name="uos_id"/>
 
22
          <field name="price_unit" invisible="1"/>
 
23
          <field name="discount" invisible="1"/>
 
24
          <field name="price_subtotal" invisible="1"/>
 
25
          <field name="subtotal_cost_price" invisible="1"/>
 
26
          <field name="company_id" invisible="1"/>
 
27
          <field name="subtotal_company"/>
 
28
          <field name="subtotal_cost_price_company"/>
 
29
          <field name="margin_absolute"/>
 
30
          <field name="margin_relative" invisible="context.get('group_by',False)"/>
 
31
        </tree>
 
32
      </field>
 
33
    </record>
 
34
 
 
35
 
 
36
    <record id="view_account_invoice_line_filter" model="ir.ui.view">
 
37
      <field name="name">account.invoice.line.select</field>
 
38
      <field name="model">account.invoice.line</field>
 
39
      <field name="type">search</field>
 
40
      <field name="arch" type="xml">
 
41
        <search string="Search Invoice Line">
 
42
          <group>
 
43
            <filter icon="terp-go-year" string="Year" 
 
44
                name="year"
 
45
                domain="[('invoice_date','&lt;=', time.strftime('%%Y-%%m-%%d')),('invoice_date','&gt;=',time.strftime('%%Y-01-01'))]"
 
46
                help="year"/>
 
47
            <separator orientation="vertical"/>
 
48
            <filter icon="terp-go-month" string="Month"
 
49
                name="month"
 
50
                domain="[('invoice_date','&lt;=',(datetime.date.today()+relativedelta(day=31)).strftime('%%Y-%%m-%%d')),('invoice_date','&gt;=',(datetime.date.today()-relativedelta(day=1)).strftime('%%Y-%%m-%%d'))]"
 
51
                help="current month"/>
 
52
            <filter icon="terp-go-month" string="Month-1"
 
53
                domain="[('invoice_date','&lt;=', (datetime.date.today() - relativedelta(day=31, months=1)).strftime('%%Y-%%m-%%d')),('invoice_date','&gt;=',(datetime.date.today() - relativedelta(day=1,months=1)).strftime('%%Y-%%m-%%d'))]"
 
54
                help="last month"/>
 
55
            <separator orientation="vertical"/>
 
56
            <field name="product_id"/>
 
57
            <field name="invoice_type"/>
 
58
            <field name="partner_id"/>
 
59
            <field name="invoice_user_id"/>
 
60
            <field name="invoice_date"/>
 
61
            <field name="account_id"/>
 
62
            <field name="company_id"/>
 
63
          </group>
 
64
          <newline/>
 
65
          <group expand="1" string="Group By...">
 
66
            <filter string="Partner" icon="terp-partner" domain="[]" context="{'group_by':'partner_id'}"/>
 
67
            <filter string="Salesman" name='user' icon="terp-personal" context="{'group_by':'invoice_user_id'}"/>
 
68
            <separator orientation="vertical"/>
 
69
            <filter string="Account" icon="terp-folder-orange" domain="[]" context="{'group_by':'account_id'}"/>
 
70
            <filter string="Invoice" icon="terp-folder-orange" domain="[]" context="{'group_by':'invoice_id'}"/>
 
71
            <separator orientation="vertical"/>
 
72
            <filter string="Invoice Type" icon="terp-stock_effects-object-colorize" domain="[]"  context="{'group_by':'invoice_type'}"/>
 
73
            <filter name="product" string="Product" icon="terp-accessories-archiver" context="{'group_by':'product_id'}"/>
 
74
          </group>
 
75
        </search>
 
76
      </field>
 
77
    </record>
78
78
 
79
79
  </data>
80
80
</openerp>
81