Odoo Help

1

0
2 答案
2
头像

Ray Carnes 美国

--Ray Carnes--
21289
| 10 7 11
Greater Los Angeles, 美国
--Ray Carnes--

Business Analyst

OpenERP 6.1, 7.0; Odoo 8.0, 9.0, 10.0, 11.0 and 12.0.

Completed Odoo Functional and Technical Training.

Functional Areas:

  • CRM/Sales

  • Inventory

  • Manufacturing

  • Accounting

  • Purchasing

Major Skills:

  • Business Process Reengineering

  • Efficiency Consulting

  • User Needs and GAP Analysis;

  • Functional and Technical Design;

  • Prototyping and Proof of Concepts;

  • Requirements Specifications;

  • Agile Implementation;

  • Data Migration;

  • Configuration & Customization (UI and code);

  • Integration - Odoo and non Odoo Applications and Services;

  • Training and Knowledge Transfer;

  • Go Live Support;

  • Helpdesk;

  • Version Upgrades and Migration.

  • Accounting Expert.

I have over 20 years of experience empowering and enabling users with enterprise information systems that make a real and measurable difference in their ability to proactively manage their businesses and organizations. 

I am a skilled Communicator and I only take the serious things seriously!

Ray Carnes 美国
2018/4/15 下午3:57

Can you just put a label above/below/near the field?





Don't  follow this snippet exactly - I used the existing MARGIN field which is a flat dollar margin amount - but you should be able to get what you want if you understand what I did here:

<label colspan="2"

            string="YOU ARE FIRED IF YOU SELL AT THESE PRICES"

            attrs="{'invisible': [('margin','&lt;', 45)]}" style="background-color:yellow;"/>

<label colspan="2"

            string="HEALTHY COMMISSION CHECK COMING YOUR WAY!"

            attrs="{'invisible': [('margin','&gt;=', 45)]}" style="background-color:palegreen;"/>

2
Pierre De Giorgio 美国
2018/4/15 下午5:32

Ray Carnes thanks for the help - I used your idea and did this instead.  

<field name="x_elec_lab_mar" attrs="{'invisible':[('x_elec_lab_mar','&lt;',0.3)]}" style="background-color:yellow;" nolabel="1" readonly="1"/>


<field name="x_elec_lab_mar" attrs="{'invisible':[('x_elec_lab_mar','&gt;',0.3)]}" style="background-color:green;" nolabel="1" readonly="1"/>

So basically I'm showing the field twice and just making the other condition invisible so it just shows one at a time.  Not the most elegant solution but it does work.  

I was hoping there was a way to directly inject some conditional statement for the style attribute.

2 注释
Ray Carnes 美国
2018/4/15 下午10:42

Just check the the field has a value both times - there aren't many cases where you can show a field twice in the same view and have the value work on the second occurance of the field.

Pierre De Giorgio 美国
2018/4/16 上午11:35

I actually have it on there 3 times (3 colors) and it seems to work for all cases. I tested it and changing a value changes all 3 instances. Thanks for the warning though. I will keep an eye on it.

提问
Keep Informed
0 关注者(s)
About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Register
Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now