[MIG] partner_gogocarto_export_api: migrate to 18.0
Migrated from 16.0.1.0.1 following the OCA migration guidelines:
- ``with_context(force_company=...)`` replaced by ``.with_company(...)``
in the controller: the ``force_company`` context key is no longer
supported and logs a warning in 18.0.
- Settings view rewritten for the 17.0+ settings structure: the legacy
``<div class="app_settings_block">`` / ``hasclass('settings')`` anchor
is gone. The block now follows the ``<block>``/``<setting>`` idiom and
inherits ``base_setup.res_config_settings_view_form``; the
``base_setup`` dependency was added accordingly. Translatable strings
are kept verbatim so the ``fr.po`` catalog stays valid.
- Fixed the ``posiion`` -> ``position`` typo in the company form
inheritance (silently defaulted to ``inside`` since 16.0).
- Version bumped to ``18.0.1.0.0``; author normalized to a
comma-separated string (pylint manifest-author-string).
Dependencies verified on 18.0: ``jsonifier`` (OCA server-tools) still
provides ``jsonify(parser)``, ``server_action_mass_edit`` (OCA
server-ux) still provides ``ir.actions.server.mass.edit.line`` and the
core ``ir.actions.server.create_action`` used by the mass-edit record.
Verified on a local 18.0 instance: clean install, and
``GET /web/<company_id>/get_http_gogocarto_elements`` returns the
expected JSON payload (flagged partners only, unknown company yields
``[]``, no ``force_company`` warnings in logs).
This commit is contained in:
28
partner_gogocarto_export_api/views/gogocarto_partner.xml
Normal file
28
partner_gogocarto_export_api/views/gogocarto_partner.xml
Normal file
@@ -0,0 +1,28 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<odoo>
|
||||
<record model="ir.ui.view" id="partner_gogocarto_form_view">
|
||||
<field name="name">partner.gogocarto.form</field>
|
||||
<field name="model">res.partner</field>
|
||||
<field name="inherit_id" ref="partner_geolocalize_usability.partner_geolocalize_form_view" />
|
||||
<field name='priority'>99</field>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//page[@name='geolocalize']/group" position="inside">
|
||||
<field name="in_gogocarto" />
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
<!-- Mass Edit Partner field in_gogocarto -->
|
||||
<record id="mass_editing_partner" model="ir.actions.server">
|
||||
<field name="state">mass_edit</field>
|
||||
<field name="name">Mass Edit In Gogocarto Field</field>
|
||||
<field name="model_id" ref="base.model_res_partner" />
|
||||
</record>
|
||||
<record id="mass_editing_partner_in_gogocarto" model="ir.actions.server.mass.edit.line" >
|
||||
<field name="server_action_id" ref="mass_editing_partner" />
|
||||
<field name="field_id" ref="partner_gogocarto_export_api.field_res_partner__in_gogocarto" />
|
||||
</record>
|
||||
<!-- Add context actions -->
|
||||
<function model="ir.actions.server" name="create_action">
|
||||
<value eval="[ref('mass_editing_partner')]" />
|
||||
</function>
|
||||
</odoo>
|
||||
Reference in New Issue
Block a user