forked from Techsystech/web
[IMP] web_widget_many2one_simple: Add a demo view to better test the functionality.
TT4036715.0-ocabot-merge-pr-2789-by-pedrobaeza-bump-patch
parent
74db246f0b
commit
a4be947e42
|
@ -64,6 +64,13 @@ Usage
|
|||
You need to declare the usage of the new widget as follows:
|
||||
``<field name="xxx" widget="many2one_simple" options="...">``
|
||||
|
||||
If you have a database with demo data, you can test this widget following these instructions:
|
||||
|
||||
#. Go to Contacts.
|
||||
#. Create or edit a record.
|
||||
#. Set "Industry" field (in Sales & Purchase tab).
|
||||
#. Only if you set the correct industry name ("Administrative" for example), it will be defined. Otherwise, it will try to create one with that name.
|
||||
|
||||
Example:
|
||||
~~~~~~~~
|
||||
|
||||
|
|
|
@ -10,6 +10,9 @@
|
|||
"depends": ["web"],
|
||||
"installable": True,
|
||||
"maintainers": ["Tardo"],
|
||||
"demo": [
|
||||
"demo/res_partner_view.xml",
|
||||
],
|
||||
"assets": {
|
||||
"web.assets_backend": [
|
||||
"web_widget_many2one_simple/static/src/css/many2one_simple.scss",
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<odoo>
|
||||
<record id="view_partner_form" model="ir.ui.view">
|
||||
<field name="model">res.partner</field>
|
||||
<field name="inherit_id" ref="base.view_partner_form" />
|
||||
<field name="arch" type="xml">
|
||||
<field name="industry_id" position="attributes">
|
||||
<attribute name="widget">many2one_simple</attribute>
|
||||
<attribute
|
||||
name="options"
|
||||
>{'search': {'field': 'name', 'oper': '=' }}</attribute>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
|
@ -1,6 +1,13 @@
|
|||
You need to declare the usage of the new widget as follows:
|
||||
``<field name="xxx" widget="many2one_simple" options="...">``
|
||||
|
||||
If you have a database with demo data, you can test this widget following these instructions:
|
||||
|
||||
#. Go to Contacts.
|
||||
#. Create or edit a record.
|
||||
#. Set "Industry" field (in Sales & Purchase tab).
|
||||
#. Only if you set the correct industry name ("Administrative" for example), it will be defined. Otherwise, it will try to create one with that name.
|
||||
|
||||
Example:
|
||||
~~~~~~~~
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta name="generator" content="Docutils 0.15.1: http://docutils.sourceforge.net/" />
|
||||
<meta name="generator" content="Docutils: http://docutils.sourceforge.net/" />
|
||||
<title>Simple many2one widget</title>
|
||||
<style type="text/css">
|
||||
|
||||
|
@ -422,6 +422,13 @@ without any extra features (no autocomplete and no partial search).</p>
|
|||
<h1><a class="toc-backref" href="#id4">Usage</a></h1>
|
||||
<p>You need to declare the usage of the new widget as follows:
|
||||
<tt class="docutils literal"><field <span class="pre">name="xxx"</span> <span class="pre">widget="many2one_simple"</span> <span class="pre">options="..."></span></tt></p>
|
||||
<p>If you have a database with demo data, you can test this widget following these instructions:</p>
|
||||
<ol class="arabic simple">
|
||||
<li>Go to Contacts.</li>
|
||||
<li>Create or edit a record.</li>
|
||||
<li>Set “Industry” field (in Sales & Purchase tab).</li>
|
||||
<li>Only if you set the correct industry name (“Administrative” for example), it will be defined. Otherwise, it will try to create one with that name.</li>
|
||||
</ol>
|
||||
<div class="section" id="example">
|
||||
<h2><a class="toc-backref" href="#id5">Example:</a></h2>
|
||||
<pre class="code xml literal-block">
|
||||
|
|
Loading…
Reference in New Issue