Odoo 도움말

0

0
1 응답
1
Avatar

Odoo Tools Russian Federation

--Odoo Tools--
10440
| 6 3 9
St Petersburg, Russian Federation
--Odoo Tools--

OdooTools is the team of developers and business analysts to help you extend Odoo potential. We have been communicating with end users to whom the software became the main business tool since 2012. As a result, we are proud of dozens of successful Odoo apps developed. We are open for new ideas and challenges to create the best Odoo tools for business needs all over the world.

The apps you may like to implement in your Odoo

KnowSystem - the tool to build deep and structured knowledge base for internal and external use

OwnCloud / NextCloud Odoo Integration - the tool to automatically synchronize Odoo attachments with OwnCloud / NextCloud files in both ways

Joint Calendar - the tool to combine different Odoo events in a few configurable calendars

Google Drive Odoo Integration - the tool to automatically synchronize Odoo attachments with Google Drive files in both ways

Product Management Interface - the tool to search, select and update product templates in batch

OneDrive / SharePoint Odoo Integration - the tool to automatically synchronize Odoo attachments with OneDrive files in both ways

Periodic Reporting and Reminders - the tool to generate and periodically send reports and reminders

--> More apps
Odoo Tools Russian Federation
19. 7. 3. 오전 6:51

One2many already adds by default an active partner into the field id_anagrafica. It is done as soon as you save a partner (no when you add a line). In order to show a partner right when you press 'Add a line', add to your field a context:

<field name="anagrafiche_codiceunivoco_ids" context="{'default_id_anagrafica': active_id}"/>

 Hiding a related partner might be also reasonable, since it anyway would be saved. To that end:

<field name="id_anagrafica" invisible="1"/>



2 의견
Simone Italy
19. 7. 3. 오전 8:04

thank you for your answer, i tried your first solution and let me know if i correctly understand :

with context i know that i can pass some informations and in this case with default_fieldname we try to set the default value, active_id i guess that is the active id of the partner from wich we open the insert form of a "codiceunivoco".

so in res_partner form_extended view i added:

<field name="anagrafiche_codiceunivoco_ids" string="Codice Univoco" widget="one2many_list" context="{'default_id_anagrafica': active_id}">

<tree>

<field name="codice"></field>

</tree>

</field>

but when i click to add line the many2one_list in "codiceunivoco" form view doesn't have the client selected.

For the second option i forgot to explaine that i have to hide the field when is called by the partner form but it must be visible when the "codiceunivoco" form view is called by another menu_action.

I think that i can do this with context or domain in id_anagrafica but i can't find how to have the partner_id.

Simone Italy
19. 7. 4. 오전 3:06

First option is exactly what i want, thank you for your answer.

질문하기
Writer
Keep Informed
2 팔로워
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