Zum Inhalt springen
Odoo Menü
  • Anmelden
  • Jetzt gratis testen
  • Apps
    Finanzen
    • Buchhaltung
    • Rechnungsstellung
    • Spesenabrechnung
    • Tabellenkalkulation (BI)
    • Dokumente
    • E-Signatur
    Vertrieb
    • CRM
    • Vertrieb
    • Kassensystem – Shop
    • Kassensystem – Restaurant
    • Abonnements
    • Vermietung
    Websites
    • Website-Builder
    • E-Commerce
    • Blog
    • Forum
    • Livechat
    • E-Learning
    Lieferkette
    • Lager
    • Fertigung
    • PLM
    • Einkauf
    • Wartung
    • Qualität
    Personalwesen
    • Mitarbeiter
    • Personalbeschaffung
    • Abwesenheiten
    • Mitarbeiterbeurteilung
    • Personalempfehlungen
    • Fuhrpark
    Marketing
    • Social Marketing
    • E-Mail-Marketing
    • SMS-Marketing
    • Veranstaltungen
    • Marketing-Automatisierung
    • Umfragen
    Dienstleistungen
    • Projekte
    • Zeiterfassung
    • Außendienst
    • Kundendienst
    • Planung
    • Termine
    Produktivität
    • Dialog
    • Genehmigungen
    • IoT
    • VoIP
    • Wissensdatenbank
    • WhatsApp
    Apps von Drittanbietern Odoo Studio Odoo Cloud-Plattform
  • Branchen
    Einzelhandel
    • Buchladen
    • Kleidergeschäft
    • Möbelhaus
    • Lebensmittelgeschäft
    • Baumarkt
    • Spielwarengeschäft
    Essen & Gastgewerbe
    • Bar und Kneipe
    • Restaurant
    • Fast Food
    • Gästehaus
    • Getränkehändler
    • Hotel
    Immobilien
    • Immobilienagentur
    • Architekturbüro
    • Baugewerbe
    • Immobilienverwaltung
    • Gartenarbeit
    • Eigentümervereinigung
    Beratung
    • Buchhaltungsfirma
    • Odoo-Partner
    • Marketingagentur
    • Anwaltskanzlei
    • Talentakquise
    • Prüfung & Zertifizierung
    Fertigung
    • Textil
    • Metall
    • Möbel
    • Speisen
    • Brauerei
    • Firmengeschenke
    Gesundheit & Fitness
    • Sportklub
    • Brillengeschäft
    • Fitnessstudio
    • Therapeut
    • Apotheke
    • Friseursalon
    Handel
    • Handyman
    • IT-Hardware & -Support
    • Solarenergiesysteme
    • Schuster
    • Reinigungsdienstleistungen
    • HLK-Dienstleistungen
    Sonstiges
    • Gemeinnützige Organisation
    • Umweltschutzagentur
    • Plakatwandvermietung
    • Fotostudio
    • Fahrrad-Leasing
    • Software-Händler
    Alle Branchen ansehen
  • Community
    Lernen
    • Tutorials
    • Dokumentation
    • Zertifizierungen
    • Schulung
    • Blog
    • Podcast
    Bildung fördern
    • Bildungsprogramm
    • Scale-Up! Planspiel
    • Odoo besuchen
    Software anfragen
    • Herunterladen
    • Editionen vergleichen
    • Releases
    Zusammenarbeiten
    • Github
    • Forum
    • Veranstaltungen
    • Übersetzungen
    • Partner werden
    • Dienstleistungen für Partner
    • Buchhaltungsfirma registrieren
    Services anfragen
    • Partner finden
    • Buchhalter finden
    • Einen Experten treffen
    • Implementierungsservices
    • Kundenreferenzen
    • Support
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Eine Demo erhalten
  • Preiskalkulation
  • Hilfe

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

  • CRM
  • e-Commerce
  • Buchhaltung
  • Lager
  • PoS
  • Projekte
  • MRP
All apps
Sie müssen registriert sein, um mit der Community zu interagieren.
Alle Beiträge Personen Abzeichen
Stichwörter (Alle anzeigen)
odoo accounting v14 pos v15
Über dieses Forum
Sie müssen registriert sein, um mit der Community zu interagieren.
Alle Beiträge Personen Abzeichen
Stichwörter (Alle anzeigen)
odoo accounting v14 pos v15
Über dieses Forum
Hilfe

How do you remove 'CREATE AND EDIT' when populating a one2many field

Abonnieren

Erhalten Sie eine Benachrichtigung, wenn es eine Aktivität zu diesem Beitrag gibt

Diese Frage wurde gekennzeichnet
pythonxmlv7
45 Antworten
87183 Ansichten
Avatar
priyankahdp

Friends, Need to remove this option from pop up manyone fields. (not in all fields.some fields need to remove this feature).i used widget="selection".then my domain filter not working.so please help me to find a solution.

create and edit

6
Avatar
Verwerfen
Kalmen Chia

Hi ,

Perhaps you can use text widget , such as <field name="division_id" /> with nothing specified in the field tag.

But in the first place why do u want to remove it ? and what do you mean by domain filter not working ? (the model that you are working on or the one2many field e.g. division that show in your screen that is not working ?

priyankahdp
Autor

yes friend.its not working.in here i can insert records without parent company also.then domain filter may useless & user can create estates without company

refer my codes in github https://github.com/priyankahdp/openerp/

Supreeth KV

Add widget="selection"

Avatar
Pawan
Beste Antwort

Hi Boris,

U can try adding an attribute "options" to the field where u want to hide "create and edit" option in xml file as:

< field name=[name] options="{'no_quick_create':True,'no_create_edit':True}"/>

This will possibly solve your problem.

thanks

10
Avatar
Verwerfen
Atchuthan - Technical Consultant, Sodexis Inc

this feature is available for Odoo8 by default but not in Odoo 7.

Avatar
Jeudy Nicolas
Beste Antwort

hi,

I reopen this question because priyankahdp link is out, and I think no answer have been written.

So, For this need, I wrote a new OpenERP V7 module web_m2o_enhanced that add some options tu many2one field xml definition:

  • create: true/false -> disable "create" entry in dropdown panel
  • create_edit: true/false -> disable "create and edit" entry in dropdown panel
  • limit: 10 (int) -> change number of selected record return in dropdown panel
  • m2o_dialog: true/false -> disable quick create M20Dialog triggered on error.

Example:

<field name="partner_id" options="{'limit': 10, 'create': false, 'create_edit': false}"/>

you can clone it from github web_m2o_enhanced repo

Update:

  • 29/05/2013: we add using of access right to show create or create and edit if you what write access on linked object by default.
  • Openerp provide by default a no_open option to disable right edit item for many2one widget.
  • 23/09/2013: Be sure to reload openerp web page after installing this module and have an empty javascript cache !
  • 15/10/2013: Now support many2manytag widget ! (OpenERP help)
  • 2/12/2013: Now in community modules: https://www.openerp.com/apps/7.0/web_m2x_options/
22
Avatar
Verwerfen
priyankahdp
Autor

thanks so much dear Nicolas

Paul Catinean

Nicolas you should be knighted for this, I have started working on the exact same module and to see it written is a relief! Thank you for the wonderful contribution, the need for this module is pretty high!

One thing though, when typing something in the many2one that does not exist on the other side and pressing tab (field losing focus) a quick-create form pops up that yet again enabled the user to create the object himself.Do you know if anything could be done about that?

Sincere regards! Paul

Jeudy Nicolas

Paul, m2o_dialog option do this. set it to false and no dialog box will appear if many2one value does not existe.

Paul Catinean

Thank you very much Nicolas, I really had no idea about that option.Hope they will implement your design in the core, you should ask for a merge or something it's very useful stuff.Thanks again!

Cheers!

Paul Catinean

One last question, the edit button on the right after you have chosen an object in the many2one.That allows you to edit the record chosen even if you do not have write privileges on that object.Any idea what can be done with that?

Jeudy Nicolas

Yes, you CAN use no_open options and SET to false

Jeudy Nicolas

We update this module to use right access to show or not some items (create, create and edit). We test it with a sale order for a salesman that can only show partner but not créate it.

Jeudy Nicolas

you can use options no_open and set to false if you don't want to see right edit button on right

CHEBBAKI kader

How to install web_m2o_enhanced module .

Jeudy Nicolas

To use this code ou must install web_m2o_enhanced module reload you javascript cache and test this on a form. Be carreful: with inherit system some other form can remove you spécial setup.

Can you give me more détails about form you change and what fails ?

Jeudy Nicolas

can you use debug mode on your browser and see if web_m2o_enhanced is loaded ?

Jeudy Nicolas

Ok now you can directly install this: https://www.openerp.com/apps/7.0/web_m2x_options/ (from openerp apps) this is the same module but released with community.

What browser do you use ?

Atchuthan - Technical Consultant, Sodexis Inc

@Nicolas JEUDY:

I have an error when I click on a "many2many" field in which i dont have any options parameter provided

ReferenceError: can_create is not defined

http://localhost:8069/web_m2x_options/static/src/js/form.js:189

Jeudy Nicolas

Ok I will try to reproduce this error

Atchuthan - Technical Consultant, Sodexis Inc

@Nicolas JEUDY, Were you able to produce the error??... Am still waiting for your result eagerly...

Jeudy Nicolas

Yes a propose a merge in community web-addons one day before and wait for review and approve. https://code.launchpad.net/~0k.io/web-addons/7.0_web_m2x_options_fix_can_create_2

This issue is ok in this revision / branch .. will be soon approved :)

Atchuthan - Technical Consultant, Sodexis Inc

Thanks for your quick response

Akhil P Sivan

Is it possible to pass conditions like, options= {'no_create':[('name','=','Akhil')]} ?

Avatar
Semah Raddaoui
Beste Antwort

Hello all,

just add no_open, no_create, no_create_edit, in options

<field name="partner_id" options='{"no_open": True,"no_create": 1, "no_create_edit": 1}'/>

I tried it and it is working fine.

6
Avatar
Verwerfen
Cristian Salamea

>=8.0 works fine and its the best option.

Avatar
CHEBBAKI kader
Beste Antwort

How to install the web_m2o_enhanced addon ?

I put this to my xml view

 <field name="codetype" options="{'create': false, 'create_edit': false}"/>

But i always see the create edit link

2
Avatar
Verwerfen
Jeudy Nicolas

Hello, are you shure you reload page after installing it and you have empty javascript cache ? This module work for many2one field, work must be done to many2many field ..

CHEBBAKI kader

I refresh and upgrade the module many times. I also empty my browser cache . But i can always see the create/edit link

Bruno

The same here. The module seems not doing anything.

Fabián De Luca

We are in the same situation.

Jeudy Nicolas

Hello,

Can you add a debugger in the get_search_result function in the static/src/js/form.js file ?

Jeudy Nicolas

Hello,

can you add debugger in the static/src/js/form.js on the first line of get_search_result function ? If the code is load, and if you use debug mode, you have to be paused in debugger line .., else, the code is not load so, we have to find why :)

Matjaz

Hi, I'm getting the same result here; "create" "create and edit" links are shown on drop down menu. I'm in debug mode, added the breakpoint, but program is not paused there. Also if I click on "create" nothing happens...

Jeudy Nicolas

Ok, I suppose you use the last version of OpenERP v7 ? I will check it out and test with a new database to see if it works. did you you to restart OpenERP server after intsalling module ?

Matjaz

Yes I'm on v7. Have tried every combination today, restarted server, de-install/install module, changed option parameters but no effect..

Jeudy Nicolas

ok, on windows or linux ? I will try with standard V7

Matjaz

Linux - Firefox and Chromium

Jeudy Nicolas

Hi elepe,

I install the module on a fresh openerp 7 instance. I reload, restart the server and all is working fine.

  • Can you double check that no other module inherit your view a remote your options ?
  • Can you paste the view you edit to see if I can help you. ?
Matjaz

Hello, I have updated your module, but still the same result. I have no idea what I'm doing wrong, so here is my view:

<record id="product_normal_form_view_intrastat" model="ir.ui.view"> <field name="name">product.normal.form.intrastat</field> <field name="model">product.product</field> <field name="inherit_id" ref="product.product_normal_form_view"/> <field name="arch" type="xml"> <field name="product_manager" position="after"> <field name="intrastat_id" options="{'create': false, 'create_edit': false}"/> </field> </field> </record>

Jeudy Nicolas

I will check on my install to see what is wrong .. I think this view is update by an other after your mods. you use a personnal module ? can you say where you define intrastat_id ? Can you check on an other field that this works ? Can you check in debug mode and using your browser debug tools that web_m2o_enahnced js is correctly load ?

Atchuthan - Technical Consultant, Sodexis Inc

Same here...

&lt;field name="default_payprofile_id" options='{"no_open": True, "create":False, "create_edit": False}' /&gt;

Avatar
Ankit H Gandhi(AHG)
Beste Antwort

Hello priyankahdp,

Please use below code.

<attribute name="options">{'no_create_edit': True, 'no_create':True, 'no_open':True}</attribute>

or

<attribute name="widget">selection</attribute>

I hope this help you.

Best Thanks,

Ankit H Gandhi.

1
Avatar
Verwerfen
Avatar
Christian Werner
Beste Antwort

Hello,

after installing the module, I get the following error on m2m fields with widget="many2many_tags"

Uncaught ReferenceError: can_create is not defined

For m2o fields all works fine.

0
Avatar
Verwerfen
Atchuthan - Technical Consultant, Sodexis Inc

problem resolved in this link: https://code.launchpad.net/~0k.io/web-addons/7.0_web_m2x_options_fix_can_create_2 (more detail available at 1st answer's comment)

Diskutieren Sie gerne? Treten Sie bei, statt nur zu lesen!

Erstellen Sie heute ein Konto, um exklusive Funktionen zu nutzen und mit unserer tollen Community zu interagieren!

Registrieren
Verknüpfte Beiträge Antworten Ansichten Aktivität
How to dynamically set field attributes in python files?
python xml v7
Avatar
Avatar
Avatar
8
Dez. 22
20971
How to remove Save Button from form view
python xml v7
Avatar
1
Mai 25
40675
attrs invisible with more than 2 arguments or with !=
python xml v7
Avatar
2
Juli 20
38790
OpenERP load one2many records list
python xml v7
Avatar
Avatar
Avatar
2
Okt. 17
18080
OpenERP 7 tree view css for Align column
python xml v7 style
Avatar
0
März 15
12058
Community
  • Tutorials
  • Dokumentation
  • Forum
Open Source
  • Herunterladen
  • Github
  • Runbot
  • Übersetzungen
Dienstleistungen
  • Odoo.sh-Hosting
  • Support
  • Upgrade
  • Individuelle Entwicklungen
  • Ausbildung
  • Buchhalter finden
  • Partner finden
  • Partner werden
Über uns
  • Unsere Firma
  • Markenwerte
  • Kontakt
  • Karriere
  • Veranstaltungen
  • Podcast
  • Blog
  • Kunden
  • Rechtliches • Datenschutz
  • Sicherheit
الْعَرَبيّة 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 ist eine Suite von Open-Source-Betriebsanwendungen, die alle Bedürfnisse Ihres Unternehmens abdecken: CRM, E-Commerce, Buchhaltung, Lager, Kassensystem, Projektmanagement etc.

Das einzigartige Wertversprechen von Odoo ist, dass es gleichzeitig sehr einfach zu bedienen und voll integriert ist.

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