İçereği Atla
Odoo Menü
  • Portal
  • Ücretsiz deneyin
  • Uygulamalar
    Finans
    • Muhasebe
    • Faturalama
    • Masraf Yönetimi
    • Elektronik Çizelge (BI)
    • Belgeler
    • İmza
    Satış
    • Müşteri İlişkileri Yönetimi (CRM)
    • Satış
    • Satış Noktası Mağaza
    • Satış Noktası Restoran
    • Abonelikler
    • Kiralama
    Web Sitesi
    • Web Sitesi Oluşturucu
    • eTicaret
    • Blog
    • Forum
    • Canlı Sohbet
    • eÖğrenme
    Tedarik Zinciri
    • Envanter
    • Üretim
    • Ürün Yaşam Döngüsü Yönetimi
    • Satın Alma
    • Bakım
    • Kalite
    İnsan Kaynakları
    • Çalışanlar
    • İşe Alım
    • İzin
    • Değerlendirme
    • Referans
    • Filo Yönetimi
    Pazarlama
    • Sosyal Medyada Pazarlama
    • E-posta ile Pazarlama
    • SMS ile Pazarlama
    • Etkinlikler
    • Pazarlama Otomasyonu
    • Anket
    Hizmetler
    • Proje Yönetimi
    • Çalışma Çizelgeleri
    • Saha Hizmeti
    • Yardım Masası
    • Planlama
    • Randevular
    Verimlilik
    • Sohbet
    • Onay
    • Nesnelerin İnterneti
    • VoIP
    • Bilgi Bankası
    • WhatsApp
    Üçüncü taraf uygulamalar Odoo Stüdyo Odoo Bulut Platformu
  • Sektörler
    Perakende satış
    • Kitapçı
    • Giyim Mağazası
    • Mobilya Mağazası
    • Gıda Marketi
    • Hırdavat Dükkanı
    • Oyuncak Dükkanı
    Gıda ve Konaklama
    • Bar ve Pub
    • Restoran
    • Fast Food Restoranı
    • Konuk Evi
    • İçecek Distribütörü
    • Otel
    Gayrimenkul
    • Emlak Acentesi
    • Mimarlık Firması
    • İnşaat
    • Emlak Yönetimi
    • Bahçe Tasarımı
    • Mülk Sahipleri Derneği
    Uzmanlık
    • Muhasebe Firması
    • Odoo Partner
    • Pazarlama Ajansı
    • Hukuk Firması
    • Yetenek Kazanımı
    • Denetim ve Belgelendirme
    Üretim
    • Tekstil
    • Metal
    • Mobilyalar
    • Gıda
    • Bira fabrikası
    • Kurumsal Hediye
    Sağlık ve Spor
    • Spor Kulübü
    • Optik Mağazası
    • Fitness Merkezi
    • Sağlıklı Yaşam Merkezi
    • Eczane
    • Kuaför Salonu
    Ticaret
    • Tamirci
    • BT Donanım & Destek
    • Güneş Enerjisi Sistemleri
    • Ayakkabı İmalatçısı
    • Temizlik Hizmetleri
    • HVAC Hizmetleri
    Diğerleri
    • Kar Amacı Gütmeyen Kuruluş
    • Çevre Ajansı
    • Reklam Panosu Kiralama
    • Fotoğrafçılık
    • Bisiklet Kiralama
    • Yazılım Bayisi
    Tüm Sektörlere Göz Atın
  • Topluluk
    Öğrenim
    • Eğitim Araçları
    • Dokümantasyon
    • Sertifikasyonlar
    • Eğitim Etkinlikleri
    • Blog
    • Podcast
    Eğitim ve Gelişim
    • Eğitim Programı
    • Scale Up! İşletme Oyunu
    • Odoo'yu Ziyaret Edin
    Yazılım
    • İndirin
    • Sürümleri Kıyaslayın
    • Sürümler
    İş Birliği
    • Github
    • Forum
    • Etkinlikler
    • Çeviriler
    • Partner Olun
    • Partnerler için Hizmetler
    • Muhasebe Firmanızı Kaydettirin
    Hizmetler
    • Partner Bulun
    • Muhasebeci Bulun
    • Bir danışmanla görüşün
    • Kurulum Hizmetleri
    • Müşteri Referansları
    • Destek
    • Sürüm Yükseltme
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Demo randevusu alın
  • Fiyatlandırma
  • Yardım

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

  • Müşteri İlişkileri Yönetimi
  • e-Commerce
  • Muhasebe
  • Envanter
  • PoS
  • Proje Yönetimi
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Etiketler (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Etiketler (View all)
odoo accounting v14 pos v15
About this forum
Yardım

How do I suppress "Create and Edit" option on state field in extended form?

Abone Ol

Get notified when there's activity on this post

Bu soru işaretlendi
2 Cevaplar
4778 Görünümler
Avatar
Hummingbiz

I have a problem with some of my users adding spurious state entries because they don't navigate the state field properly and, rather than selecting their desired state, they end up creating a new record in res_country_state, often with improper data.

I would like to restrict this behavior by suppressing the "Create and Edit" option on the widget.  Setting options no_create and/or no_quick_create are said to suppress the option for a many2one widget, but do not have any apparent effect on the o_address_state widget.

These changes are on a form extended from the base product leads form.

We are running Odoo Enterprise v13.x.

Thanks in advance.

0
Avatar
Vazgeç
Avatar
Sunny Sheth
En İyi Yanıt

Hi,

You can do it easily in your ODOO Standard View as of now or do it via a custom module for no_create on the state field. 

Add option ==> "no_create": True




Now you get the desired result.




Thanks & Regards,

Sunny Sheth

0
Avatar
Vazgeç
Hummingbiz
Üretici

I confirmed that your solution -- editing the form online -- works. I have extended the CRM module to add some fields to the leads form, and that is where I am trying to effect this new behavior.

I have replaced the base state_id field by this:

<xpath expr="//group/group[1]/div/field[@name='state_id']" position="replace">

<field name="state_id" class="o_address_state" placeholder="State"

options="{'no_open': True, 'no_create': True}"/>

</xpath>

This doesn't seem to effect the change. I confirmed that this addresses the correct field by making it invisible temporarily.

Sunny Sheth

Can you put your Whole View / Record instead of the only XPath?

and add screenshot if possible

Thanks

Hummingbiz
Üretici

I added the whole record to this thread.

Avatar
Hummingbiz
Üretici En İyi Yanıt

Here is the entire record:

<record id="crm_lead_view_form_ext" model="ir.ui.view">
<field name="name">crm.lead.form.ext</field>
<field name="model">crm.lead</field>
<field name="inherit_id" ref="crm.crm_lead_view_form"/>
<field name="arch" type="xml">
<xpath expr="//h2" position="replace"/>
<button name="%(crm.crm_lead_lost_action)d" position="attributes">
<attribute name="attrs">{'invisible': [('active', '=', False)]}
</attribute>
</button>
<button name="%(crm.action_crm_lead2opportunity_partner)d" position="after">
<button name="%(crm.crm_lead_lost_action)d" position="move"/>
</button>
<button name="action_set_lost" position="replace">
<button name="action_set_lost" string="Mark as Lost" type="object" invisible="1"/>
</button>
<button name="action_set_lost" position="after">
<button name="%(action_crm_lead2irslogics)d" string="Submit Case to IRS Logics"
type="action"
help="Submit Case to IRS Logics"
class="oe_highlight"
attrs="{'invisible': ['|', ('active', '=', False), ('irs_logics_case_id', '!=', False)]}"/>
</button>
<xpath expr="//group/group[1]/field[@name='partner_id']" position="before">
<field name="id_string" string="Lead ID" readonly="1"/>
</xpath>
<xpath expr="//group/group[2]/field[@name='partner_id']" position="before">
<field name="id_string" string="Lead ID" readonly="1"/>
</xpath>
<xpath expr="//field[@name='function']" position="attributes">
<attribute name="invisible">1</attribute>
</xpath>
<xpath expr="//field[@name='email_cc']" position="attributes">
<attribute name="invisible">1</attribute>
</xpath>
<xpath expr="//field[@name='website']" position="attributes">
<attribute name="invisible">1</attribute>
</xpath>
<xpath expr="//field[@name='lang_id']" position="attributes">
<attribute name="invisible">1</attribute>
</xpath>
<xpath expr="//field[@name='team_id']" position="attributes">
<attribute name="invisible">1</attribute>
</xpath>
<xpath expr="//group/group[4]/field[@name='tag_ids']" position="attributes">
<attribute name="invisible">1</attribute>
</xpath>
<xpath expr="//group/group[6]/field[@name='tag_ids']" position="attributes">
<attribute name="invisible">1</attribute>
</xpath>
<xpath expr="//field[@name='user_id']" position="replace">
<field name="user_id"
string="Settlement Officer"
domain="[('share', '=', False)]"
context="{'default_groups_ref': ['base.group_user', 'base.group_partner_manager', 'sales_team.group_sale_salesman_all_leads'], 'team_id': team_id}"/>
</xpath>
<xpath expr="//field[@name='user_id']" position="replace">
<field name="user_id"
string="Settlement Officer"
domain="[('share', '=', False)]"
context="{'default_groups_ref': ['base.group_user', 'base.group_partner_manager', 'sales_team.group_sale_salesman_all_leads'], 'team_id': team_id}"/>
</xpath>
<xpath expr="//field[@name='user_id']" position="before">
<field name="contact_first_name" string="Contact First Name"/>
<field name="contact_last_name" string="Contact Last Name"/>
<field name="last4"/>
<field name="opening_salesperson_user_id" required="True"/>
</xpath>
<xpath expr="//group/group[4]/field[@name='priority']" position="before">
<field name="irs_logics_case_id" readonly="1"/>
<field name="irs_logics_case_status" readonly="1"/>
<field name="irs_logics_endpoint" readonly="1"/>
</xpath>
<xpath expr="//group/group[1]/div/field[@name='state_id']" position="replace">
<field name="state_id" class="o_address_state" placeholder="State"
options="{'no_open': True, 'no_create': True}"/>
</xpath>
<xpath expr="//group/group[6]/field[@name='priority']" position="before">
<field name="irs_logics_case_id" readonly="1"/>
<field name="irs_logics_case_status" readonly="1"/>
<field name="irs_logics_endpoint" readonly="1"/>
</xpath>
<xpath expr="//page[1]" position="replace">
<page name="description" string="Third Base">
<field name="description" placeholder="Enter Third Base notes..."/>
</page>
</xpath>
<xpath expr="//page[@name='extra']" position="attributes">
<attribute name="invisible">1</attribute>
</xpath>
<xpath expr="//page[@name='extra']" position="before">
<page name="tax_lien" string="Tax Liens">
<field name="tax_liens">
<tree create="true" delete="true">
<field name="plaintiff"/>
<field name="company_currency" invisible="1"/>
<field name="amount" string="Amount" class="oe_inline" widget='monetary'
options="{'currency_field': 'company_currency'}"/>
<field name="filing_date"/>
<field name="state_filed"/>
<field name="county"/>
<control>
<create name="add_lien_control" string="Add a lien"/>
</control>
</tree>
</field>
</page>
<page name="financial_data" string="Snap Financials">
<group string="Firms">
<group colspan="4">
<field name="customer_has_retained_other_firm"
string="Has customer retained another firm?" widget="boolean_toggle"/>
<field name="customer_has_retained_other_firm_notes" string="Notes"/>
</group>
</group>
<group string="Employment">
<group colspan="4">
<field name="employment_status" string="Employment Status"/>
<field name="employer"/>
<field name="employment_notes" string="Notes"/>
</group>
</group>
<group string="Income">
<group colspan="4">
<div class="o_row">
<field name="company_currency" invisible="1"/>
<field name="income" string="Income" class="oe_inline" widget='monetary'
options="{'currency_field': 'company_currency'}"/>
<span class="mr-1">Per</span>
<field name="income_frequency"/>
<span class="mr-1">Paid</span>
<field name="pay_period"/>
</div>
</group>
<group colspan="4">
<field name="income_notes" string="Notes" colspan="4"
placeholder="Enter details regarding customer's income here."/>
</group>
</group>
<group>
<group string="Assets" name="assets" colspan="4">
<field name="assets" nolabel="1"
placeholder="Enter details regarding customer's assets here."/>
</group>
</group>
<group>
<group string="Bank Data" name="bank_data" colspan="4">
<field name="bank_data" nolabel="1"
placeholder="Enter details regarding customer's bank accounts here."/>
</group>
</group>
<group>
<group string="Credit Score" colspan="4">
<group colspan="2">
<field name="credit_score"/>
</group>
<group colspan="4">
<field name="credit_score_notes" string="Notes"
placeholder="Enter details regarding customer's credit here."/>
</group>
</group>
</group>
</page>
<page name="closer_notes" string="Closer Notes">
<field name="closer_notes" placeholder="Add closer notes..."/>
</page>
<page name="tax_data" string="Tax Data">
<group string="General">
<group>
<field name="contact_first_name"/>
<field name="contact_last_name"/>
</group>
<group>
<field name="file_name"/>
<field name="list_date"/>
</group>
</group>
<group string="LexisNexis">
<group>
<field name="entity_type"/>
<field name="rmsid"/>
</group>
<group>
<field name="orig_dept"/>
<field name="age_range"/>
</group>
</group>
<group string="FLA">
<group>
<field name="ssn_fin"/>
</group>
</group>
<group string="ATYPE">
<group>
<field name="crrt"/>
<field name="dpc"/>
<field name="barcode"/>
<field name="gender"/>
<field name="individual"/>
<field name="business"/>
<field name="federal_tax"/>
<field name="state_tax"/>
</group>
<group>
<field name="ul_month"/>
<field name="rdi"/>
<field name="ran"/>
</group>
</group>
</page>
</xpath>
<!-- move third base (aka description aka page[1]) after closer notes -->
<xpath expr="//page[@name='closer_notes']" position="after">
<xpath expr="//page[1]" position="move"/>
</xpath>
</field>
</record>

0
Avatar
Vazgeç
Sunny Sheth

Hi,

Please try with the below code for the state_id field

<field name="state_id" class="o_address_state" placeholder="State"

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

Thanks

Hummingbiz
Üretici

Thanks for looking at this. I tried your suggestion -- options="{'no_open': True, 'no_create': True, 'no_create_edit': True}"/> -- but this did not change the results.

Hummingbiz
Üretici

To be clear, I tried this as a replacement in my extended view (shown above).

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

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

Üye Ol
Topluluk
  • Eğitim Araçları
  • Dokümantasyon
  • Forum
Açık Kaynak
  • İndirin
  • Github
  • Runbot
  • Çeviriler
Hizmetler
  • Odoo.sh Hosting
  • Destek
  • Sürüm Yükseltme
  • Özel Geliştirmeler
  • Eğitim
  • Muhasebeci Bulun
  • Partner Bulun
  • Partner Olun
Hakkında
  • Şirketimiz
  • Pazarlama Gereçleri
  • İletişim
  • Kariyer
  • Etkinlikler
  • Podcast
  • Blog
  • Müşteriler
  • Hukuki • Gizlilik
  • Güvenlik
الْعَرَبيّة 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, müşteri ilişkileri yönetimi, eTicaret, muhasebe, envanter, satış noktası, proje yönetimi gibi şirketinizin tüm ihtiyaçlarını karşılayan bir açık kaynak işletme uygulamaları paketidir.

Odoo’nun eşsiz değer önermesi, aynı anda hem kullanımının çok kolay olup hem de tamamen entegre olmasıdır.

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