Odoo Help

0

0
1 答案
0
头像

Sudhir Arya (ERP Harbor Consulting Services) 印度

--Sudhir Arya (ERP Harbor Consulting Services)--
24550
| 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) 印度
2018/4/11 上午1:18

Hi David,

You should use _inherits / delegation  in your case which will not affect the parent table in the database.

Difference between _inherit and _inherits

Sudhir Arya
ERP Harbor Consulting Services
Skype:sudhir@erpharbor.com
Website: http://www.erpharbor.com
3 注释
David Yao 香港特别行政区
2018/4/11 上午2:19

Thanks for reply, for using _inherits, I still got error saying that it can't find field new_cloumn. This is how I do it.

PY file changed to:

_name = new_B

_inherits = { 'exist_A':'new_cloumn' }

new_cloumn = fields.Many2one('exist_A')

Sudhir Arya (ERP Harbor Consulting Services) 印度
2018/4/11 上午2:23

Remove / comment "_inherits" and add delegate=True in your field.

EX: new_cloumn = fields.Many2one('exist_A', delegate=True)

David Yao 香港特别行政区
2018/4/11 上午3:35

This is how it looks like after edit it:

PY file:

_name='new_B'

new_cloumn = fields.Many2one('exist_A', delegate=True)

Result: Error remains the same...

In terms of XML: for where need to refer to a model, I use exist_A, not new_B, does it matter? E.g. action: <field name="res_model">exist_A</field> view: <field name="model">exist_A</field>

提问
Writer
标签
Keep Informed
1 关注者(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