Skip to Content
Odoo Menu
  • Zaloguj się
  • Wypróbuj za darmo
  • Aplikacje
    Finanse
    • Księgowość
    • Fakturowanie
    • Wydatki
    • Arkusz kalkulacyjny (BI)
    • Dokumenty
    • Podpisy
    Sprzedaż
    • CRM
    • Sprzedaż
    • PoS Sklep
    • PoS Restauracja
    • Subskrypcje
    • Wypożyczalnia
    Strony Internetowe
    • Kreator Stron Internetowych
    • eCommerce
    • Blog
    • Forum
    • Czat na Żywo
    • eLearning
    Łańcuch dostaw
    • Magazyn
    • Produkcja
    • PLM
    • Zakupy
    • Konserwacja
    • Jakość
    Zasoby Ludzkie
    • Pracownicy
    • Rekrutacja
    • Urlopy
    • Ocena pracy
    • Polecenia Pracownicze
    • Flota
    Marketing
    • Marketing Społecznościowy
    • E-mail Marketing
    • SMS Marketing
    • Wydarzenia
    • Automatyzacja Marketingu
    • Ankiety
    Usługi
    • Projekt
    • Ewidencja czasu pracy
    • Usługi Terenowe
    • Helpdesk
    • Planowanie
    • Spotkania
    Produktywność
    • Dyskusje
    • Zatwierdzenia
    • IoT
    • VoIP
    • Baza wiedzy
    • WhatsApp
    Aplikacje trzecich stron Studio Odoo Odoo Cloud Platform
  • Branże
    Sprzedaż detaliczna
    • Księgarnia
    • Sklep odzieżowy
    • Sklep meblowy
    • Sklep spożywczy
    • Sklep z narzędziami
    • Sklep z zabawkami
    Żywienie i hotelarstwo
    • Bar i Pub
    • Restauracja
    • Fast Food
    • Pensjonat
    • Dystrybutor napojów
    • Hotel
    Agencja nieruchomości
    • Agencja nieruchomości
    • Biuro architektoniczne
    • Budowa
    • Zarządzanie nieruchomościami
    • Ogrodnictwo
    • Stowarzyszenie właścicieli nieruchomości
    Doradztwo
    • Biuro księgowe
    • Partner Odoo
    • Agencja marketingowa
    • Kancelaria prawna
    • Agencja rekrutacyjna
    • Audyt i certyfikacja
    Produkcja
    • Tekstylia
    • Metal
    • Meble
    • Jedzenie
    • Browar
    • Prezenty firmowe
    Zdrowie & Fitness
    • Klub sportowy
    • Salon optyczny
    • Centrum fitness
    • Praktycy Wellness
    • Apteka
    • Salon fryzjerski
    Transakcje
    • Złota rączka
    • Wsparcie Sprzętu IT
    • Systemy energii słonecznej
    • Szewc
    • Firma sprzątająca
    • Usługi HVAC
    Inne
    • Organizacja non-profit
    • Agencja Środowiskowa
    • Wynajem billboardów
    • Fotografia
    • Leasing rowerów
    • Sprzedawca oprogramowania
    Przeglądaj wszystkie branże
  • Community
    Ucz się
    • Samouczki
    • Dokumentacja
    • Certyfikacje
    • Szkolenie
    • Blog
    • Podcast
    Pomóż w nauce innym
    • Program Edukacyjny
    • Scale Up! Gra biznesowa
    • Odwiedź Odoo
    Skorzystaj z oprogramowania
    • Pobierz
    • Porównaj edycje
    • Wydania
    Współpracuj
    • Github
    • Forum
    • Wydarzenia
    • Tłumaczenia
    • Zostań partnerem
    • Usługi dla partnerów
    • Zarejestruj swoją firmę rachunkową
    Skorzystaj z usług
    • Znajdź partnera
    • Znajdź księgowego
    • Spotkaj się z doradcą
    • Usługi wdrożenia
    • Opinie klientów
    • Wsparcie
    • Aktualizacje
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Zaplanuj demo
  • Cennik
  • Pomoc

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

  • CRM
  • e-Commerce
  • Księgowość
  • Zapasy
  • PoS
  • Projekt
  • MRP
All apps
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
Wszystkie posty Osoby Odznaki
Tagi (Zobacz wszystko)
odoo accounting v14 pos v15
O tym forum
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
Wszystkie posty Osoby Odznaki
Tagi (Zobacz wszystko)
odoo accounting v14 pos v15
O tym forum
Pomoc

how to add a tab to the customer's notebook

Zaprenumeruj

Otrzymaj powiadomienie o aktywności w tym poście

To pytanie dostało ostrzeżenie
menunewmodulemenuitemnewtab
3 Odpowiedzi
15833 Widoki
Awatar
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
Awatar
Odrzuć
Awatar
Ghanshyam Prajapati
Najlepsza odpowiedź

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
Awatar
Odrzuć
Quentin
Autor

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
Autor

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
Autor

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

Quentin
Autor

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
Autor

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

Awatar
GuruDev
Najlepsza odpowiedź

Hi Quentin, I think, you need to inherit the

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

1
Awatar
Odrzuć
Quentin
Autor

I did but I saved _name

Awatar
Quentin
Autor Najlepsza odpowiedź

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
Awatar
Odrzuć
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
Autor

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.

Podoba Ci się ta dyskusja? Dołącz do niej!

Stwórz konto dzisiaj, aby cieszyć się ekskluzywnymi funkcjami i wchodzić w interakcje z naszą wspaniałą społecznością!

Zarejestruj się
Powiązane posty Odpowiedzi Widoki Czynność
Dropdown sub-menu offset away from position
menu menuitem
Awatar
0
gru 24
1814
How to add a new action menu item? Rozwiązane
module menu newmodule menuitem new
Awatar
Awatar
Awatar
Awatar
Awatar
17
wrz 22
107213
How to create a new menu item and place it under other module's menu? Rozwiązane
menu menuitem
Awatar
Awatar
Awatar
Awatar
4
paź 19
35316
After finishing installation I do not get any menu items the page is blank
menu menuitem
Awatar
Awatar
1
kwi 17
4553
No such external ID currently defined in the system error while adding a menu item.
menu menuitem
Awatar
Awatar
2
mar 15
8193
Społeczność
  • Samouczki
  • Dokumentacja
  • Forum
Open Source
  • Pobierz
  • Github
  • Runbot
  • Tłumaczenia
Usługi
  • Hosting Odoo.sh
  • Wsparcie
  • Aktualizacja
  • Indywidualne rozwiązania
  • Edukacja
  • Znajdź księgowego
  • Znajdź partnera
  • Zostań partnerem
O nas
  • Nasza firma
  • Zasoby marki
  • Skontaktuj się z nami
  • Oferty pracy
  • Wydarzenia
  • Podcast
  • Blog
  • Klienci
  • Informacje prawne • Prywatność
  • Bezpieczeństwo Odoo
الْعَرَبيّة 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 to pakiet aplikacji biznesowych typu open source, które zaspokoją wszystkie potrzeby Twojej firmy: CRM, eCommerce, księgowość, inwentaryzacja, punkt sprzedaży, zarządzanie projektami itp.

Unikalną wartością Odoo jest to, że jest jednocześnie bardzo łatwe w użyciu i w pełni zintegrowane.

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