Migrate code 16 to 17.

Technical details.

Errors.

  1. Attribute "attrs" deprecated. It look like 
    <field name="url" widget="url" attrs="{'invisible':[('type','=','binary')]}"/>
    to <field name="url" widget="url" invisible="type == 'binary'"/>

  2. Res.config.settings changed inherit. Look like:

    <xpath expr="//div[hasclass('settings')]" position="inside">
    to

    <xpath expr="//app[@name='general_settings']" position="inside">
      <block title="Attachments center" name="attachments_center">

In progress

Owl. Frontend. Js.

1.  Main difference it "patch" change import path:

import { patch } from "web.utils";
to
import { patch } from "@web/core/utils/patch";




2. Patch now not get second name parametr:

patch(ChatterTopbar.prototype, "attachments_manager_chatter_topbar", {/*OUR CODE*/})
to 
patch(ChatterTopbar.prototype, {/*OUR CODE*/})




3. When patch and override "setup" method, some code will
also breaks:

patch(ChatterTopbar.prototype, {
  setup() {
    this._super(...arguments);
...
to

patch(ChatterTopbar.prototype, {
  setup() {
    super.setup();



Warnings

  1.  active_id, active_ids shoulde be replace with is ids
                    <field
                                name="child_category_ids"
                                widget="one2many"
                                mode="tree"
                                context="{'default_parent_id': active_id}"
                            />
to
                            <field
                                name="child_category_ids"
                                widget="one2many"
                                mode="tree"
                                context="{'default_parent_id': id}"
                            /> 2. In all XML first string like this should be deleted
<?xml version="1.0" encoding="utf-8"?>
   1.Readonly attr houl be bool
     file_ids = fields.One2many(
        comodel_name="ir.attachment",
        inverse_name="category_id",
        string="Files",
        readonly=True,
    )
Owl. Frontend. Js,

In process...

Sign in to leave a comment
ERROR: could not serialize access due to concurrent
postgresql