Pular para o conteúdo
Menu
Esta pergunta foi sinalizada
3 Respostas
2036 Visualizações

Hello everyone,

I’m trying to extend a calendar view in Odoo 16, specifically the “popover”. I’ve followed various steps and guides, but I keep encountering the following error:


odoo.tools.convert.ParseError: while parsing None:3, somewhere inside.


I can’t figure out what I’m doing wrong. Can anyone help me?

Thank you very much!


Struttura del mio modulo

my_module/
├── __init__.py
├── __manifest__.py
└── views/
    └── attendee_calendar_common_popover_extension.xml

__manifest__.py

{
    'name': 'My Module',
    'version': '1.0',
    'summary': 'Estende la vista del calendario per aggiungere più campi',
    'category': 'Calendar',
    'depends': ['calendar'],
    'data': [
        'views/attendee_calendar_common_popover_extension.xml',
    ],
    'installable': True,
    'application': False,
}

attendee_calendar_common_popover_extension.xml



Parent View

 https://github.com/odoo/odoo/blob/16.0/addons/calendar/static/src/views/attendee_calendar/common/attendee_calendar_common_popover.xml



Avatar
Cancelar
Melhor resposta

@pietro how did we add field email and phone for example of the client that has a pipline in crm and a meeting in the calendar?
I mean i want to add the client phone and email fields in the popover of the calender 

Avatar
Cancelar
Autor

I solved the issue by moving the XML file from `data` to `assets` in the `__manifest__.py` file. The correct configuration is:

'assets': {
'web.assets_backend': [
'my_module/static/src/views/attendee_calendar_common_popover_extension.xml',
],
},

Here is the content of the XML file:

<?xml version="1.0" encoding="UTF-8"?>
<templates>
<t t-name="my_module.attendee_calendar_common_popover_extension_body"
t-inherit="calendar.AttendeeCalendarCommonPopover.body"
t-inherit-mode="extension" owl="1">
<xpath expr="//ul[hasclass('o_cw_popover_fields_secondary')]" position="before">
......
</xpath>
</t>
</templates>

I hope this helps!

Melhor resposta

Did you ever get this working?

Avatar
Cancelar
Autor

I solved the issue by moving the XML file from `data` to `assets` in the `__manifest__.py` file. The correct configuration is:

'assets': {
'web.assets_backend': [
'my_module/static/src/views/attendee_calendar_common_popover_extension.xml',
],
},

Here is the content of the XML file:

<?xml version="1.0" encoding="UTF-8"?>
<templates>
<t t-name="my_module.attendee_calendar_common_popover_extension_body"
t-inherit="calendar.AttendeeCalendarCommonPopover.body"
t-inherit-mode="extension" owl="1">
<xpath expr="//ul[hasclass('o_cw_popover_fields_secondary')]" position="before">
......
</xpath>
</t>
</templates>

I hope this helps!

Autor Melhor resposta

Update my attendee_calendar_common_popover_extension.xml 

https://odoocdn.com/web/image/50942312-ebf8af2b/image.png?access_token=18757bf7-85bb-4591-831d-82245da49f68



Avatar
Cancelar
Publicações relacionadas Respostas Visualizações Atividade
1
fev. 25
1245
1
abr. 15
7126
5
mar. 15
14504
3
jun. 21
7660
6
set. 20
8914