跳至內容
選單
此問題已被標幟

Odoo CE v13.
Using this addon. i have unique customer code field (attached to each customer).
i want, everyone in system (specially accounting team to view (generated invoices) with customer name hidden and instead showing customer code or Sale Order Reference.
Q. is it possible without code? just by security rules? any ideas will help. huge thanks in advance. regards, Haseeb

頭像
捨棄

Guten Tag 

Ich bin bis 27.06.2022 nicht im Büro. 

In dringenden Angelegenheiten senden Sie bitte Ihre Anfrage an support@nivels.ch oder rufen uns auf unserer Informatik Support Hotline +41 81 511 65 04 an. 

Besten Dank 

Ralf Müller


*********************** 

Dear customer Your answer to your email will be delayed as I’m in holiday until Jun 27. 

In urgent cases please send your inquiry to support@nivels.ch or call our support helpline @ +41 81 511 65 04. 

Best regards, 

最佳答案

dear sir, you need to inherit account.view_move_form and make you change like the folowing:

locate the field partner_id in your xpath with position replace 
then add the fowloing two fields:
              1-"partner_id" widget="res_partner_many2one" nolabel="1" context="{'res_partner_search_mode': (context.get('default_move_type', 'entry') in ('out_invoice', 'out_refund', 'out_receipt') and 'customer') or (context.get('default_move_type', 'entry') in ('in_invoice', 'in_refund', 'in_receipt') and 'supplier') or False, 'show_address': 1, 'default_is_company': True, 'show_vat': True}" options="{"always_reload": True, "no_quick_create": True}" attrs="{'invisible': [('move_type', 'not in', ('in_invoice', 'in_refund',  'in_receipt'))]}"/>

2-partner_code" attrs="{'invisible': [('move_type', 'in', ('in_invoice', 'in_refund',  'in_receipt'))]}"

  and close xpth

          if you want to restrict some users : you can change groups attributes

  

頭像
捨棄
最佳答案

Hello Haseeb
You can follow below steps to allow only particular user to show customer.
1) You need create new field customer_code for invoice which is relatable to customer code.
now you can show this field in invoice to all users.
2) Now for showing customer only to particular user you can directly create one group and then assign that group to partner_id(customer) on invoice.
3)Now assign that group to users which you want to allow to show customer on invoice.

Thanks.

頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
0
7月 23
1978
1
3月 15
7461
1
8月 25
794
1
7月 25
738
1
7月 25
796