|
| 1 | +<odoo> |
| 2 | + <record id="view_farmer_groups_list_tree" model="ir.ui.view"> |
| 3 | + <field name="name">view_farmer_groups_list_tree</field> |
| 4 | + <field name="model">res.partner</field> |
| 5 | + <field name="priority">1000</field> |
| 6 | + <field name="arch" type="xml"> |
| 7 | + <tree decoration-danger="disabled" duplicate="0"> |
| 8 | + <field name="name" /> |
| 9 | + <field name="address" /> |
| 10 | + <field name="phone" /> |
| 11 | + <field |
| 12 | + name="tags_ids" |
| 13 | + widget="many2many_tags" |
| 14 | + options="{'color_field': 'color', 'no_create_edit': True}" |
| 15 | + string="Tags" |
| 16 | + /> |
| 17 | + <field name="registration_date" /> |
| 18 | + <field name="disabled" column_invisible="1" /> |
| 19 | + <field name="company_id" groups="base.group_multi_company" /> |
| 20 | + </tree> |
| 21 | + </field> |
| 22 | + </record> |
| 23 | + |
| 24 | + <record id="view_farmer_groups_form" model="ir.ui.view"> |
| 25 | + <field name="name">view_farmer_groups_form</field> |
| 26 | + <field name="model">res.partner</field> |
| 27 | + <field name="priority">1000</field> |
| 28 | + <field name="arch" type="xml"> |
| 29 | + <form string="Group Registrant" duplicate="0"> |
| 30 | + <sheet> |
| 31 | + <div class="oe_button_box" name="button_box"> |
| 32 | + <button |
| 33 | + type="action" |
| 34 | + class="oe_stat_button" |
| 35 | + icon="fa-ban" |
| 36 | + name="%(g2p_registry_base.action_disable_registrant_wizard)d" |
| 37 | + invisible="disabled" |
| 38 | + title="Disable" |
| 39 | + > |
| 40 | + <div class="o_form_field o_stat_info"> |
| 41 | + <span class="o_stat_text">Disable</span> |
| 42 | + </div> |
| 43 | + </button> |
| 44 | + <button |
| 45 | + type="object" |
| 46 | + class="oe_stat_button" |
| 47 | + icon="fa-check" |
| 48 | + name="enable_registrant" |
| 49 | + invisible="not disabled" |
| 50 | + title="Enable" |
| 51 | + > |
| 52 | + <div class="o_form_field o_stat_info"> |
| 53 | + <span class="o_stat_text">Enable</span> |
| 54 | + </div> |
| 55 | + </button> |
| 56 | + </div> |
| 57 | + <widget name="web_ribbon" title="Archived" bg_color="bg-danger" invisible="active" /> |
| 58 | + <widget |
| 59 | + name="web_ribbon" |
| 60 | + title="Disabled" |
| 61 | + bg_color="bg-warning" |
| 62 | + invisible="not disabled" |
| 63 | + /> |
| 64 | + <field |
| 65 | + name="image_1920" |
| 66 | + widget="image" |
| 67 | + class="oe_avatar" |
| 68 | + options="{'preview_image': 'avatar_128'}" |
| 69 | + /> |
| 70 | + <div class="oe_title mb24"> |
| 71 | + <h1> |
| 72 | + <field |
| 73 | + id="registrant" |
| 74 | + name="name" |
| 75 | + placeholder="Enter name of group..." |
| 76 | + required="1" |
| 77 | + readonly="disabled" |
| 78 | + /> |
| 79 | + </h1> |
| 80 | + <div class="o_row"> |
| 81 | + <label for="tags_ids" string="Tags: " /> |
| 82 | + <field |
| 83 | + name="tags_ids" |
| 84 | + widget="many2many_tags" |
| 85 | + options="{'color_field': 'color', 'no_create_edit': True}" |
| 86 | + placeholder="Tags..." |
| 87 | + colspan="4" |
| 88 | + string="Tags" |
| 89 | + readonly="disabled" |
| 90 | + /> |
| 91 | + <label for="company_id" string=" | Company: " groups="base.group_multi_company" /> |
| 92 | + <field |
| 93 | + name="company_id" |
| 94 | + groups="base.group_multi_company" |
| 95 | + options="{'no_create': True}" |
| 96 | + readonly="parent_id" |
| 97 | + force_save="1" |
| 98 | + /> |
| 99 | + </div> |
| 100 | + </div> |
| 101 | + <group colspan="4" col="4"> |
| 102 | + <field name="registration_date" readonly="disabled or registration_date" /> |
| 103 | + <label for="lang" invisible="active_lang_count <=1" /> |
| 104 | + <div class="o_row" invisible="active_lang_count <= 1"> |
| 105 | + <field name="lang" readonly="disabled" /> |
| 106 | + </div> |
| 107 | + <field |
| 108 | + name="kind" |
| 109 | + colspan="2" |
| 110 | + options="{'no_open':True, 'no_create_edit':True,'no_create':True}" |
| 111 | + readonly="disabled" |
| 112 | + /> |
| 113 | + </group> |
| 114 | + <notebook> |
| 115 | + <page name="basic_info" string="Contact Details" invisible="1"> |
| 116 | + <group colspan="4" col="4"> |
| 117 | + <group colspan="2"> |
| 118 | + <span class="o_form_label o_td_label" name="address_name"> |
| 119 | + <b>Address</b> |
| 120 | + </span> |
| 121 | + <div class="o_address_format"> |
| 122 | + <field name="address" readonly="disabled" /> |
| 123 | + </div> |
| 124 | + </group> |
| 125 | + <group colspan="2"> |
| 126 | + <field |
| 127 | + name="phone_number_ids" |
| 128 | + readonly="disabled" |
| 129 | + context="{'reg_form':True}" |
| 130 | + nolabel="1" |
| 131 | + colspan="2" |
| 132 | + > |
| 133 | + <tree decoration-danger="disabled"> |
| 134 | + <field |
| 135 | + name="phone_no" |
| 136 | + string="Phone Numbers" |
| 137 | + widget="phone" |
| 138 | + options="{'enable_sms': false}" |
| 139 | + /> |
| 140 | + <field name="country_id" /> |
| 141 | + <field name="disabled" column_invisible="1" /> |
| 142 | + </tree> |
| 143 | + </field> |
| 144 | + <field |
| 145 | + name="email" |
| 146 | + widget="email" |
| 147 | + context="{'gravatar_image': True}" |
| 148 | + readonly="disabled" |
| 149 | + /> |
| 150 | + </group> |
| 151 | + </group> |
| 152 | + </page> |
| 153 | + <page name="other" string="Other Information"> |
| 154 | + <group> |
| 155 | + <group> |
| 156 | + <field name="create_date" /> |
| 157 | + <field name="create_uid" /> |
| 158 | + <field name="write_date" /> |
| 159 | + <field name="write_uid" /> |
| 160 | + </group> |
| 161 | + <group> |
| 162 | + <field name="disabled" readonly="1" /> |
| 163 | + <field name="disabled_by" readonly="1" /> |
| 164 | + <field name="disabled_reason" readonly="1" /> |
| 165 | + </group> |
| 166 | + </group> |
| 167 | + </page> |
| 168 | + </notebook> |
| 169 | + <field name="avatar_128" invisible="1" /> |
| 170 | + <field name="active" invisible="1" /> |
| 171 | + <field name="country_code" invisible="1" /> |
| 172 | + <field name="is_registrant" invisible="1" /> |
| 173 | + <field name="parent_id" invisible="1" /> |
| 174 | + <field name="is_group" invisible="1" /> |
| 175 | + <field name="phone" invisible="1" /> |
| 176 | + <field name="active_lang_count" invisible="1" /> |
| 177 | + <field name="user_ids" invisible="1" /> |
| 178 | + </sheet> |
| 179 | + <div class="oe_chatter"> |
| 180 | + <field name="message_follower_ids" /> |
| 181 | + <field name="activity_ids" /> |
| 182 | + <field name="message_ids" /> |
| 183 | + </div> |
| 184 | + </form> |
| 185 | + </field> |
| 186 | + </record> |
| 187 | + |
| 188 | + <record id="action_farmer_groups_list" model="ir.actions.act_window"> |
| 189 | + <field name="name">Farmer Groups</field> |
| 190 | + <field name="type">ir.actions.act_window</field> |
| 191 | + <field name="res_model">res.partner</field> |
| 192 | + <field name="view_mode">tree,form</field> |
| 193 | + <field name="search_view_id" ref="g2p_registry_group.view_registry_groups_filter" /> |
| 194 | + <field |
| 195 | + name="context" |
| 196 | + >{'default_is_registrant':True,'default_is_group':True,'registrant_form':True}</field> |
| 197 | + <field name="domain">[('is_registrant', '=', True),('is_group','=',True)]</field> |
| 198 | + <field name="help" type="html"> |
| 199 | + <p class="o_view_nocontent_smiling_face"> |
| 200 | + Create a new farmer's group! |
| 201 | + </p><p> |
| 202 | + Click the create button to enter the new farmer's group information. |
| 203 | + </p> |
| 204 | + </field> |
| 205 | + </record> |
| 206 | + |
| 207 | + <record id="action_farmer_groups_list_tree_view" model="ir.actions.act_window.view"> |
| 208 | + <field name="sequence" eval="1" /> |
| 209 | + <field name="view_mode">tree</field> |
| 210 | + <field name="view_id" ref="view_farmer_groups_list_tree" /> |
| 211 | + <field name="act_window_id" ref="action_farmer_groups_list" /> |
| 212 | + </record> |
| 213 | + |
| 214 | + <record id="action_farmer_groups_form_view" model="ir.actions.act_window.view"> |
| 215 | + <field name="sequence" eval="1" /> |
| 216 | + <field name="view_mode">form</field> |
| 217 | + <field name="view_id" ref="view_farmer_groups_form" /> |
| 218 | + <field name="act_window_id" ref="action_farmer_groups_list" /> |
| 219 | + </record> |
| 220 | + |
| 221 | + <menuitem |
| 222 | + id="menu_farmer_groups_list" |
| 223 | + name="Farmer Groups" |
| 224 | + action="action_farmer_groups_list" |
| 225 | + parent="g2p_registry_base.g2p_main_menu_root" |
| 226 | + sequence="5" |
| 227 | + groups="g2p_registry_base.group_g2p_admin,g2p_registry_base.group_g2p_registrar" |
| 228 | + /> |
| 229 | + |
| 230 | +</odoo> |
0 commit comments