Odoo Help

0

0
8 Answers
1
Avatar

Zbik

--Zbik--
12143
| 7 6 9
Łódź, 波兰
--Zbik--


Zbik
2019/5/30 上午8:56

It's impossible. Model res.user inherits from model res.partner.

class Users(models.Model):
  _inherits = {'res.partner': 'partner_id'}

4 Comments
Tabla d.o.o., Samo Arko
2019/5/30 上午9:12

they are two different fields in a wizard that works with tasks. one field is the m2o relation to res.partner the other is a m2o relation to res.users. The weird part is when I have set partner_id and not user_id it works but not the other way around.

Zbik
2019/5/30 上午9:37

Well. this is a different situation and it should work. How you defined these fields. It is possible that the reason is also in a completely different place.

Zbik
2019/5/30 上午10:17

Probably partner_id is set in module automatically after selecting the user, and user is not set when is selected the partner

Tabla d.o.o., Samo Arko
2019/5/31 上午1:51

yeah... the reason is in a different place. removed the attributes from the fields and made both not required and I'm still getting the same validation error.

1
Avatar

Sudhir Arya (ERP Harbor Consulting Services)

--Sudhir Arya (ERP Harbor Consulting Services)--
22823
| 8 9 10
Ahmedabad, 印度
--Sudhir Arya (ERP Harbor Consulting Services)--

• Co-Founder & Co-Owner at ERP Harbor Consulting Services

• ERP Consultant / ERP Customization / TechnoFunctional Expert

• Sound knowledge in Python, Odoo (Open ERP), XML, PostgreSQL

• Domain knowledge of Sale Management, Purchase Management, Warehouse Management, Manufacturing, Multi Company Configuration & Management, HR Management, Medical Management, Construction Management, Education Management, Point of Sale, Third Party Integrations

• Positive attitude and quick Learner

• Good analytical skill, quick bug and issue tracing and find the solution

• Good knowledge and experience in payment gateway integration with Odoo

• Ready to accept new challenges

• Active Memeber On Stackoverflow 

LinkedIn

Blog

Stackoverflow

ERP Harbor Consulting Services

Skype:sudhir@erpharbor.com
Website: http://www.erpharbor.com
Sudhir Arya (ERP Harbor Consulting Services)
2019/5/30 上午8:53

Your attrs syntax seems to be correct. Make sure required=True is not set in the py file in the fields definition. If it is set, make it required=False.

1 Comment
Tabla d.o.o., Samo Arko
2019/5/30 上午9:09

The python files don't have required. I'm setting required only on views.

0
Samo Arko
2019/5/31 上午1:57

I fed up. Had an if statement in an related model that I used that checked that the partner_id is set and I searched for it with match case enabled so I didn't find it. Sorry Zbik and Sudhir Arya for wasting your time.

Ask a Question
Writer
Keep Informed
1 follower(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 eLearning platform and experience all Odoo Apps through learning videos, use cases and quizzes.

Test it now