~therp-nl/purchase-wkfl/7.0-add_purchase_reset_invoice_method

« back to all changes in this revision

Viewing changes to framework_agreement/view/framework_agreement_view.xml

  • Committer: Joel Grand-Guillaume
  • Author(s): Nicolas Bessi
  • Date: 2014-02-06 12:31:12 UTC
  • mfrom: (19.1.22 purchase-wkfl)
  • Revision ID: joel.grandguillaume@camptocamp.com-20140206123112-h2k4n29dl2sm7k9i
[MRG][ADD] Framework Agreement module. This new module allow you to deal with contracted quantity and prices per supplier for a given product. It provide all tools to extend it for your needs, like an observable mixin to enable various on_change warning on other object (to warn user about price change, remaining quantity, etc..)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?xml version="1.0" encoding="utf-8"?>
 
2
<openerp>
 
3
  <data>
 
4
    <record id="framework_agreement_list_view" model="ir.ui.view">
 
5
      <field name="name">framework agreement list view</field>
 
6
      <field name="model">framework.agreement</field>
 
7
      <field name="arch" type="xml">
 
8
        <tree version="7.0" string="Framework Agreement (LTA)"> <!-- editable="bottom" -->
 
9
          <field name="name" />
 
10
          <field name="company_id" groups="base.group_multi_company" widget="selection"/>
 
11
          <field name="product_id"/>
 
12
          <field name="supplier_id"/>
 
13
          <field name="delay"/>
 
14
          <field name="quantity"/>
 
15
          <field name="available_quantity"/>
 
16
          <field name="start_date"/>
 
17
          <field name="end_date"/>
 
18
          <field name="state"/>
 
19
        </tree>
 
20
      </field>
 
21
    </record>
 
22
 
 
23
    <record id="framework_agreement_form_view" model="ir.ui.view">
 
24
      <field name="name">framework agreement form</field>
 
25
      <field name="model">framework.agreement</field>
 
26
      <field name="arch" type="xml">
 
27
        <form version="7.0" string="Framework Agreement">
 
28
          <header>
 
29
          <button name="open_agreement"
 
30
                  context="{}"
 
31
                  string="Open Agreement"
 
32
                  type="object"
 
33
                  attrs="{'invisible': ['|', ('draft', '=', False), '|', ('start_date', '=', False), '|', ('end_date', '=', False), '|', ('framework_agreement_pricelist_ids', '=', False)]}"/>
 
34
            <field name="state"
 
35
                   widget="statusbar"
 
36
                   nolabel="1"
 
37
                   statusbar_visible="draft,future,running,consumed,closed"
 
38
                   statusbar_colors='{"draft":"blue","future": "blue", "closed": "blue", "running": "green", "consumed": "red"}'/>
 
39
          </header>
 
40
          <sheet>
 
41
            <group>
 
42
              <field name="name"/>
 
43
              <field name="origin"/>
 
44
              <field name="draft" invisible="1"/>
 
45
            </group>
 
46
            <group>
 
47
              <group>
 
48
                <field name="company_id" groups="base.group_multi_company" widget="selection"/>
 
49
                <field name="supplier_id" context="{'default_supplier': True, 'default_customer': False}"/>
 
50
                <field name="product_id"/>
 
51
              </group>
 
52
              <group>
 
53
                <field name="delay"/>
 
54
                <field name="quantity"/>
 
55
                <field name="available_quantity"/>
 
56
              </group>
 
57
            </group>
 
58
 
 
59
            <group string="Dates">
 
60
              <field name="start_date"
 
61
                     required="1"/>
 
62
              <field name="end_date"
 
63
                     required="1"/>
 
64
            </group>
 
65
            <notebook>
 
66
              <page string="Negociated price lists" colspan="4">
 
67
                <field name="framework_agreement_pricelist_ids"
 
68
                       required="1">
 
69
                  <tree type="7.0" string="Price list">
 
70
                    <field name="currency_id"/>
 
71
                  </tree>
 
72
                  <form type="7.0" string="Price list">
 
73
                    <group>
 
74
                      <field name="currency_id"/>
 
75
                    </group>
 
76
                    <newline/>
 
77
                    <notebook>
 
78
                      <page string="Price lines" colspan="4">
 
79
                        <field name="framework_agreement_line_ids"
 
80
                               nolabel="1">
 
81
                          <tree type="7.0"
 
82
                                string="Price line"
 
83
                                editable="top">
 
84
                            <field name="quantity"/>
 
85
                            <field name="price"/>
 
86
                          </tree>
 
87
                        </field>
 
88
                      </page>
 
89
                    </notebook>
 
90
                  </form>
 
91
                </field>
 
92
              </page>
 
93
            </notebook>
 
94
          </sheet>
 
95
        </form>
 
96
      </field>
 
97
    </record>
 
98
 
 
99
 
 
100
    <record model="ir.actions.act_window" id="action_framework_agreement">
 
101
      <field name="name">Framework Agreement</field>
 
102
      <field name="type">ir.actions.act_window</field>
 
103
      <field name="res_model">framework.agreement</field>
 
104
      <field name="domain"></field>
 
105
      <field name="view_type">form</field>
 
106
      <field name="view_mode">tree,form</field>
 
107
      <field name="view_id" ref="framework_agreement_list_view"/>
 
108
    </record>
 
109
 
 
110
 
 
111
    <menuitem
 
112
        name="Framework Agreement"
 
113
        parent="purchase.menu_purchase_config_pricelist"
 
114
        action="action_framework_agreement"
 
115
        id="action_framework_agreement_menu"/>
 
116
 
 
117
  </data>
 
118
</openerp>