Skip to Content
Odoo Menu
  • Prisijungti
  • Išbandykite nemokamai
  • Programėlės
    Finansai
    • Apskaita
    • Pateikimas apmokėjimui
    • Sąnaudos
    • Skaičiuoklė (BI)
    • Dokumentai
    • Pasirašymas
    Pardavimai
    • CRM
    • Pardavimai
    • Kasų sistema - Parduotuvė
    • Kasų sistema - Restoranas
    • Prenumeratos
    • Nuoma
    Svetainės
    • Svetainių kūrėjimo įrankis
    • El. Prekyba
    • Internetinis Tinklaraštis
    • Forumas
    • Tiesioginis pokalbis
    • eMokymasis
    Tiekimo grandinė
    • Atsarga
    • Gamyba
    • PLM
    • Įsigijimai
    • Priežiūra
    • Kokybė
    Žmogaus ištekliai
    • Darbuotojai
    • Įdarbinimas
    • Atostogos
    • Įvertinimai
    • Rekomendacijos
    • Transporto priemonės
    Rinkodara
    • Socialinė rinkodara
    • Rinkodara el. paštu
    • SMS rinkodara
    • Renginiai
    • Rinkodaros automatizavimas
    • Apklausos
    Paslaugos
    • Projektas
    • Darbo laiko žiniaraščiai
    • Priežiūros tarnyba
    • Pagalbos tarnyba
    • Planavimas
    • Rezervacijos
    Produktyvumas
    • Diskucija
    • Patvirtinimai
    • IoT
    • VoIP
    • Žinių biblioteka
    • WhatsApp
    Trečiųjų šalių programos Odoo Studija Odoo debesijos platforma
  • Pramonės šakos
    Mažmeninė prekyba
    • Knygynas
    • Drabužių parduotuvė
    • Baldų parduotuvė
    • Maisto prekių parduotuvė
    • Techninės įrangos parduotuvė
    • Žaislų parduotuvė
    Food & Hospitality
    • Barai ir pub'ai
    • Restoranas
    • Greitasis maistas
    • Guest House
    • Gėrimų platintojas
    • Hotel
    Nekilnojamasis turtas
    • Real Estate Agency
    • Architektūros įmonė
    • Konstrukcija
    • Estate Managament
    • Sodininkauti
    • Turto savininkų asociacija
    Konsultavimas
    • Accounting Firm
    • Odoo Partneris
    • Marketing Agency
    • Teisinė firma
    • Talentų paieška
    • Auditai & sertifikavimas
    Gamyba
    • Textile
    • Metal
    • Furnitures
    • Maistas
    • Brewery
    • Įmonių dovanos
    Sveikata & Fitnesas
    • Sporto klubas
    • Akinių parduotuvė
    • Fitneso Centras
    • Sveikatos praktikai
    • Vaistinė
    • Kirpėjas
    Trades
    • Handyman
    • IT įranga ir palaikymas
    • Saulės energijos sistemos
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Kiti
    • Nonprofit Organization
    • Aplinkos agentūra
    • Reklaminių stendų nuoma
    • Fotografavimas
    • Dviračių nuoma
    • Programinės įrangos perpardavėjas
    Browse all Industries
  • Bendrija
    Mokykitės
    • Mokomosios medžiagos
    • Dokumentacija
    • Sertifikatai
    • Mokymai
    • Internetinis Tinklaraštis
    • Tinklalaidės
    Skatinkite švietinimą
    • Švietimo programa
    • Scale Up! Verslo žaidimas
    • Aplankykite Odoo
    Gaukite programinę įrangą
    • Atsisiųsti
    • Palyginkite versijas
    • Leidimai
    Bendradarbiauti
    • Github
    • Forumas
    • Renginiai
    • Vertimai
    • Tapkite partneriu
    • Services for Partners
    • Registruokite jūsų apskaitos įmonę
    Gaukite paslaugas
    • Susiraskite partnerį
    • Susirask buhalterį
    • Susitikti su konsultantu
    • Diegimo paslaugos
    • Klientų rekomendavimas
    • Palaikymas
    • Atnaujinimai
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Gaukite demo
  • Kainodara
  • Pagalba

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • Apskaita
  • Atsarga
  • PoS
  • Projektas
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Žymos (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Žymos (View all)
odoo accounting v14 pos v15
About this forum
Pagalba

how to add a tab to the customer's notebook

Prenumeruoti

Get notified when there's activity on this post

This question has been flagged
menunewmodulemenuitemnewtab
3 Replies
15825 Rodiniai
Portretas
Quentin

I developed a module and I would like add an item menu on the left and a tab to the customer's notebook.

For the menu on the left, I didn't try to find how to add this but I will see later (it's easier). For my tab I added a new view but it's not working (in comment inside my view.xml).

Could you help me.

This is my code :

my "password.py" :

from osv import osv
from osv import fields
class password(osv.osv):
 "'password Class"'

    _name='password'
    _columns=
    {
            'name':fiels.char("Name",size=128),
            'user':fields.char("Username",size=128),
            'host':fields.char("IP/HostName",size=128),
            'pass':fields.char("Password",size=128),
            'com':fields.char("Comment",size=128),            
    }
password()

my "password_view.xml ":

<?xml version="1.0" encoding="utf-8"?>

<openerp>
    <data>

        <record id="password_tree_view" model="ir.ui.view">
            <field name="name">password.tree</field>
                <field name="model">password</field>
                <field name="arch" type="xml">
                    <tree string="Password Tree">
                        <field name="name"/>
                <field name="user"/>
                        <field name="host"/>
                        <field name="pass"/>
                        <field name="com"/>
                    </tree>
                </field>
        </record>

        <record id="password_form_view" model="ir.ui.view">
            <field name="name">password.form</field>
                <field name="model">password</field>
                <field name="arch" type="xml">
                    <form string="Password Form">
                            <field name="name"/><field name="user"/>
                            <field name="host"/><field name="pass"/>
                            <field name="com"/>
                    </form>
                </field>
        </record>

        <!--<record id="password_partner_view" model="ir.ui.view">
            <field name="name">password.partner</field>
                <field name="inherit_id" ref="base.view_partner_form"/>
                <field name="model">view.partner</field>
                <field name="arch" type="xml">    
                    <xpath expr="//page[@string='Sales & Purchases']" position="after">
                        <field name="password"/>
                    </xpath>
                </field>
        </record>-->

        <record id="password_action" model="ir.actions.act_window">
            <field name="name">password</field>
            <field name="res_model">password</field>
            <field name="view_type">tree</field>
            <field name="view_mode">tree,form</field>
        </record>

    </data>
</openerp>

my __init__.py :

import password

and my __openerp__.py :

{
    'name': 'Password module',
    'version': '1.0',
    'category': 'Partner/Customer Management',
    'description': """""",
    'author': '',
    'website': '',
    'depends': ['base'],
    'data': ['password/password_view.xml'],

    'installable': True,
    'auto_install': False,
    'application': False,
}
0
Portretas
Atmesti
Portretas
Ghanshyam Prajapati
Best Answer

Hi, Try Following, In your PY, class password(osv.osv): "'password Class"'

    _name='password'
    _inherit = "res.partner"

In your XML,

<record id="password_form_view" model="ir.ui.view">
    <field name="name">password.form</field>
        <field name="model">password</field>
        <field name="arch" type="xml">
        <field name="inherit_id" ref="base.view_partner_form" />                
                  <notebook position="inside">
                       <page string="Customer Notebook">
                       </page>
                       <page string = "Password Form">
                            <field name="name"/>
                            <field name="user"/>
                            <field name="host"/>
                            <field name="pass"/>
                            <field name="com"/>
                       </page>
                  </notebook>                            
            </form>
        </field>
</record>

Hope it work for you.

2
Portretas
Atmesti
Quentin
Autorius

It doesn't work... "ValidateError Error occurred while validating the field(s) arch: Invalid XML for View Architecture!" I added <form string="Password Form"> before <notebook position="inside"> but It doesn't still work !

GuruDev

Dear Quentin, You better edit the view file like: <code> <openerp> </data> <record id="view_partner_inherited_form" model="ir.ui.view"> <field name="name">partner.passwd</field> <field name="model">res.partner</field> <field name="type">form</field> <field name="inherit_id" ref="base.view_partner_form"/> <field name="arch" type="xml"> <notebook position="inside"> <page string="Password Form"> <field name="YOUR FIELDS" nolabel="1"/> </code>

and close each tag, appropriately..

Quentin
Autorius

Thank you for your help Ghanshyam Prajapati !

Ghanshyam Prajapati

Hi Quentin, If your problem is solved then please mark my answer as solved. Thanks.

Quentin
Autorius

It's not still solved, but don't worry, I will if it solved !

Quentin
Autorius

I have to replace my former form view or add this code as new view?

Ghanshyam Prajapati

http://help.openerp.com/question/20948/how-to-inherit-calendarevent-with-a-different-name/#21011 see this link, hope it work for you.

Quentin
Autorius

Guys, did it work for you? because I can't fix it, I don't know why !

Portretas
GuruDev
Best Answer

Hi Quentin, I think, you need to inherit the

res.partner model into your password.py file. Then, __name field is not required.

1
Portretas
Atmesti
Quentin
Autorius

I did but I saved _name

Portretas
Quentin
Autorius Best Answer

So this is my new password_view.xml and password.py. Some errors are not fixed but I'm on the right way :

<?xml version="1.0" encoding="utf-8"?>

<openerp>
    <data>

        <record id="view_password_form" model="ir.ui.view">
            <field name="name">Password Form</field>
                <field name="model">password.table</field>
                <field name="arch" type="xml">
                    <form string="Password Form">
                        <field name="name_pid"/>
                        <field name="user_pid"/>
                        <field name="host_pid"/>
                        <field name="pass_pid" password='True'/>
                        <field name="com_pid"/>
                    </form>
                </field>
        </record>

        <record id="view_password_tree" model="ir.ui.view">
            <field name="name">Password Tree</field>
                <field name="model">password.table</field>
                <field name="arch" type="xml">
                    <tree string="Password Tree">
                        <field name="name_pid"/>
                        <field name="host_pid"/>
                <field name="user_pid"/>
                        <field name="pass_pid" password='True'/>
                        <field name="com_pid"/>
                    </tree>
            </field>
        </record>

       <record id="view_password_partner_form" model="ir.ui.view">
            <field name="name">Password Partner Form</field>
            <field name="model">res.partner</field>
            <field name="inherit_id" ref="base.view_partner_form"/>
            <field name="arch" type="xml">
                <data>
                    <xpath expr="//page[@string='Sales & Purchases']" position="after">
                        <page string="Password">
                        </page>
                    </xpath>
                    <xpath expr="//page[@string='Password']" position="inside">
                        <field name="passwords">
                        </field>
                    </xpath>
                </data>
            </field>
        </record>

        <record id="action_password" model="ir.actions.act_window">
            <field name="name">Password</field>
            <field name="type">ir.actions.act_window</field>
            <field name="res_model">password.table</field>
            <field name="view_type">form</field>
            <field name="view_mode">form,tree</field>
            <field name="help" type="html">
              <p class="oe_view_nocontent_create">
                Click to save a new login.
              </p><p>
                OpenERP will save this login for you: Hostname, Username, Password.
              </p>
            </field>
        </record>

        <menuitem action="action_password" id="action_menu_password" parent="base.menu_sales" name="Password"/>

    </data>
</openerp>

...

from openerp.osv import osv, fields

class password(osv.osv):

    _inherit = 'res.partner'

    _columns = {
        'passwords': fields.one2many('password.table')

   }
password()

class password_table(osv.osv):
    _name="password.table"

    _columns = {
            'name_pid':fields.many2one('res.partner', 'name', required=True),
            'user_pid':fields.char("UserName",size=128, required=True),
            'host_pid':fields.char("IP/HostName",size=128, required=True),
            'pass_pid':fields.char("Password",size=128, required=True),
            'com_pid':fields.text("Comment")
        }
password_table()

The menu is working but my form view is always in editing mode by default. And I have some problems may be with postgresql. The error is following : 'HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts.'

Somebody could help me?

0
Portretas
Atmesti
GuruDev

Dear Quintin, Did you try like this?

<code> <record id="view_password_partner_form" model="ir.ui.view"> <field name="name">Password Partner Form</field> <field name="model">res.partner</field>

</code>

see the model name

Quentin
Autorius

I find how do for the tab. I have always to fix some issues about my item menu but I'm in the right way. I'll edit this answer with the latest code. Thank you GuruDev for your help.

Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Registracija
Related Posts Replies Rodiniai Veikla
Dropdown sub-menu offset away from position
menu menuitem
Portretas
0
gruod. 24
1812
How to add a new action menu item? Solved
module menu newmodule menuitem new
Portretas
Portretas
Portretas
Portretas
Portretas
17
rugs. 22
107201
How to create a new menu item and place it under other module's menu? Solved
menu menuitem
Portretas
Portretas
Portretas
Portretas
4
spal. 19
35312
After finishing installation I do not get any menu items the page is blank
menu menuitem
Portretas
Portretas
1
bal. 17
4552
No such external ID currently defined in the system error while adding a menu item.
menu menuitem
Portretas
Portretas
2
kov. 15
8193
Bendrija
  • Mokomosios medžiagos
  • Dokumentacija
  • Forumas
Atvirasis kodas
  • Atsisiųsti
  • Github
  • Runbot
  • Vertimai
Paslaugos
  • Odoo.sh talpinimas
  • Palaikymas
  • Atnaujinti
  • Pritaikytas programavimo kūrimas
  • Švietimas
  • Susirask buhalterį
  • Susiraskite partnerį
  • Tapkite partneriu
Apie mus
  • Mūsų įmonė
  • Prekės ženklo turtas
  • Susisiekite su mumis
  • Darbo pasiūlymai
  • Renginiai
  • Tinklalaidės
  • Internetinis Tinklaraštis
  • Klientai
  • Teisinis • Privatumas
  • Saugumas
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo yra atvirojo kodo verslo programų rinkinys, kuris apima visas įmonės poreikius: CRM, El. Prekybą, Apskaitą, Atsargų, Kasų sistemą, Projektų valdymą ir kt.

Unikali Odoo vertės pasiūla – būti tuo pačiu metu labai lengvai naudojama ir visiškai integruota sistema.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now