Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odpovědět
569 Zobrazení

Hi everyone,

I'm working on customizing the Events module in Odoo 18 (Community, Online) using only Odoo Studio — no backend or developer access. The goal is to add two tabs inside each Event form:

  1. Participants Tab – with fields like attendee name, email, phone, status, ticket type, activities, etc.
  2. Vendors Tab – with fields like vendor name, phone, email, and expense category.

I created two new models using Studio:

  • Event Participant Line
  • Event Vendor Line

Each has a Many2one field pointing to res.partner for name, and other fields (char or Many2one for category, phone, etc). I added a Many2one to the Event model so I could link it via One2many in the Event form.

Then, I added tabs inside the Event form and dragged One2many fields (linked to these models) to display the lines inline.

Here's the issue:

Everything looks fine at first — I can click “Add a line,” fill in the fields, and click save.

But after saving and closing, the fields like name, phone, email disappear — the data isn’t saved or linked properly.

I’ve tried:

  • Recreating the models
  • Checking the relation fields
  • Trying Char vs Many2one
  • Creating inline views from scratch
  • Saving/reloading repeatedly

Same problem persists.

Also tried creating email templates to trigger off these tabs, but Studio doesn’t support email automation or linking templates dynamically.

My question is:

Has anyone been able to get this working purely using Odoo Studio? Is this just a known limitation, and backend code is absolutely required for these kinds of nested record links to behave correctly?

Appreciate any insight or workarounds!

Thanks in advance 

Avatar
Zrušit
Nejlepší odpověď

Hello Tarun,

Based on your description, you're encountering a common Studio limitation with relational data persistence. Here's how to make this work without backend code:

The Root Problem

When using Studio-created models with One2many relationships, Odoo often fails to properly save the relational data due to missing inverse fields in the underlying database structure.

Working Solution (Pure Studio Approach)

1. Recreate Your Models Correctly

For Participants:

  1. In Studio, create "Event Participant" model
  2. Critical Fields:
    • event_id (Many2one to Event)
    • partner_id (Many2one to res.partner)
    • status (Selection field)
    • ticket_type (Char or Many2one to a custom "Ticket Type" model)

For Vendors:

  1. Create "Event Vendor" model
  2. Critical Fields:
    • event_id (Many2one to Event)
    • partner_id (Many2one to res.partner)
    • expense_category (Many2one to a custom "Expense Category" model)
2. Configure the Event Form
  1. Edit the Event form in Studio
  2. Add two new tabs
  3. For each tab:
    • Add a One2many field
    • Set the relation to your custom model
    • Set the inverse field (event_id)
3. Fixing the Disappearing Data Issue

The key is to use the form view widget instead of inline:

  1. Remove your current One2many fields
  2. Re-add them but:
    • Click the gear icon on the One2many field
    • Change Widget from "Many2many" to "One2many"
    • Set View Mode to "form,tree" (not just "tree")
    • Enable "Allow creation", "Allow deletion"
4. Alternative Approach Using Existing Relations

Instead of custom models, leverage Odoo's built-in:

  • Participants: Use event.registration model (already exists)
  • Vendors: Use event.sponsor model (exists in Enterprise)

You can customize these existing models in Studio without creating new ones.

Why This Works

  • Using form view forces proper record creation before linking
  • Built-in models already have proper database relations
  • Odoo handles the inverse field management automatically

Limitations to Accept

  1. Email Automation: Studio can't create automated emails based on these custom tabs
  2. Advanced Filtering: Complex domain filters may not work
  3. Mobile App: Custom tabs may not appear in mobile views

Workaround for Email Notifications

Create manual email templates under Settings → Technical → Email → Templates, then:

  1. Add a "Send Email" button to your custom tabs
  2. Configure it to use your template
  3. Users will need to click manually to send

Final Recommendation

For a production environment, consider:

  1. Using Odoo Enterprise (has built-in sponsor/vendor features)
  2. A one-time developer assist to properly create the models

Odoo.sh trial to test with more backend access

🚀 Did This Solve Your Problem?

If this answer helped you save time, money, or frustration, consider:

✅ Upvoting (👍) to help others find it faster

✅ Marking as "Best Answer" if it resolved your issue

Your feedback keeps the Odoo community strong! 💪

(Need further customization? Drop a comment—I’m happy to refine the solution!)

Avatar
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
1
čvc 25
1171
2
bře 25
1446
0
úno 25
1102
0
úno 25
1262
0
úno 25
1210