Odoo Help

2

1
3 Answers
0
Avatar

Vasiliy Birukov Russian Federation

--Vasiliy Birukov--
3606
| 8 6 10
Togliatty, Russian Federation
--Vasiliy Birukov--

Help develop and implement any project on base Odoo.

Vasiliy Birukov Russian Federation
7/9/14, 3:25 AM

Under label Address placed several fields. If you need move only field street, just redefine label for other filed. For example:

<label for="street2" string="Address"/>

0
Avatar

Jagdish Panchal India

--Jagdish Panchal--

2776
| 6 4 8
Gandhinagar, India
--Jagdish Panchal--

OpenERP Developer

Jagdish Panchal India
7/9/14, 5:01 AM

Hi

Refer below code

test_module(add following file)
- __init__.py
- __openeerp__.py
- test_customer_view.xml

__openerp__.py

{
    'name': 'Test module,
    'version': '0.1',
    'category': 'Others',
    'complexity': "normal",
    'description': """ description related your module """
    'author': ['author of moudule'],
    'website': 'website name',
    'depends': [
        "base" #This module depend on the res_partner thats why I add base
    ],
    'init_xml': [
        #Demo data file if you want create any.
    ],
    'update_xml': [
        "test_customer_view.xml",
    ],
    'demo_xml': [],
    'test': [],
    'installable': True,
    'auto_install': False,
    'application': False,
    'images': [],
    'js': [],
}

test_customer_view.xml:

<?xml version="1.0" encoding="utf-8"?>
<openerp>
  <data>
    <record model="ir.ui.view" id="view_customer_test_form">
        <field name="name">res.partner.form</field>
        <field name="model">res.partner</field>
        <field name="inherit_id" ref="base.view_partner_form" />
        <field name="arch" type="xml">

              <field name="street" placeholder="Street..." position="replace">
                  <field name="street" placeholder="Street..."  string ="xxy"/>
              </field>

        </field>
    </record>

  </data>
</openerp>

0
Frankie Chan Hong Kong
7/9/14, 4:51 AM

I have tried the following but it does not work. Can you please give the details?

<?xml version="1.0" encoding="utf-8"?>
<openerp>
  <data>
    <record model="ir.ui.view" id="view_customer_test_form">
        <field name="name">res.partner.form</field>
        <field name="model">res.partner</field>
        <field name="inherit_id" ref="base.view_partner_form" />
        <field name="arch" type="xml">


              <label for="street" string="xxy"/>

        </field>
    </record>

  </data>
</openerp>

6 Comments
Jagdish Panchal India
7/9/14, 6:45 AM

@ Frankie Chan: Create new module add xml file and install your new module. so you did not need to change existing moduel

Frankie Chan Hong Kong
7/9/14, 8:34 AM
Hi Jagdish,

Thanks for your reply.

Yes, you are right. I can create new module.

However, I am new to openerp. In the new xml file, I need to create view_form, view_tree, action form, menuitem and so on, which is very difficult to me.

Besides, there are many folders I need to take care of, for example, static, i18n, images, security, css, src, js, etc. They are also very new to me.

I can directly change the existing file but it will be better if I can copy it to a new file and change what I need.

Can you suggest?

Thanks.

Regards,

Frankie


On Wed, Jul 9, 2014 at 6:45 PM, Jagdish Panchal <jnp1682@openerp.my.openerp.com> wrote:

@ Frankie Chan: Create new module add xml file and install your new module. so you did not need to change existing moduel

--
Jagdish Panchal Sent by OpenERP Inc. using OpenERP. Access your messages and documents in Odoo

Jagdish Panchal India
7/9/14, 8:51 AM

Hi just add test_customer_view.xml file in your module and add this code in your file.

Frankie Chan Hong Kong
7/9/14, 10:37 AM
In test_customer_view.xml, which code should I add ?


On Wed, Jul 9, 2014 at 8:51 PM, Jagdish Panchal <jnp1682@openerp.my.openerp.com> wrote:

Hi just add test_customer_view.xml file in your module and add this code in your file.

--
Jagdish Panchal Sent by OpenERP Inc. using OpenERP. Access your messages and documents in Odoo

Jagdish Panchal India
7/9/14, 11:40 PM

@ Frankie Chan: Add code in my answer in test_customer_view.xml thanks

Jagdish Panchal India
7/10/14, 12:40 AM

Hi Frankie Chan: I have update answer check it.

Ask a Question
Writer
Tags
Keep Informed
1 follower(s)
About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Register
Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now