Giter Club home page Giter Club logo

Comments (7)

lmignon avatar lmignon commented on July 18, 2024

@ErpSoftAppNG Thank you for the report. Can you check into the odoo log if there is no stacktrace generated when you click on the create button on the server side. I'm not able to reproduce this bug on my installation.

from alfodoo.

 avatar commented on July 18, 2024

i created a new setup on a fresh system, i still got the same error. Something is wrong somewhere ?

from alfodoo.

lmignon avatar lmignon commented on July 18, 2024

@ErpSoftAppNG I am quite disappointed because I can't reproduce the problem on my side. If everything works despite the error in javascript, it is possible that the problem comes from a deffered method in javascript that is launched after the directory is created. It would be necessary to do some javascript debugging....

"crm.claim" no more exists into odoo11, I suppose that the provided code into the description is not the right one...

from alfodoo.

 avatar commented on July 18, 2024

Yea sure, i just copied the example in the doc here since the error seems to be general with all models.

The errors comes from

 /**
     * This is an extremely important method.  All changes in any field go
     * through this method.  It will then apply them in the local state, check
     * if onchanges needs to be applied, actually do them if necessary, then
     * resolves with the list of changed fields.
     *
     * @param {string} record_id
     * @param {Object} changes a map field => new value
     * @param {Object} [options] will be transferred to the applyChange method
     *   @see _applyChange
     * @returns {string[]} list of changed fields
     */
    notifyChanges: function (record_id, changes, options) {
        return this.mutex.exec(this._applyChange.bind(this, record_id, changes, options));
    },

When this method is called
changes = {value : undefined }
Which is suppose to be
changes = { <name_of_field> : <new_value> }
This loop triggers the error since there is no field called value

for (var fieldName in changes) {
            field = record.fields[fieldName];
            if (field.type === 'one2many' || field.type === 'many2many') {
                defs.push(this._applyX2ManyChange(record, fieldName, changes[fieldName], options.viewType));
            } else if (field.type === 'many2one' || field.type === 'reference') {
                defs.push(this._applyX2OneChange(record, fieldName, changes[fieldName]));
            } else {
                record._changes[fieldName] = changes[fieldName];
            }
        }

Currently the solution is to change the field name to value

from odoo import models
from odoo.addons.cmis_field import fields


class CrmClaim(models.Model):
    _inherit = 'crm.claim'

    value = fields.CmisFolder()

so It just passes through smoothly

from alfodoo.

lmignon avatar lmignon commented on July 18, 2024

@ErpSoftAppNG Thank you for the report. a3fb397 should solve the issue.
The fix is available on the branch https://github.com/acsone/alfodoo/tree/11.0-dev

Can you confirm that the issue is now solved?

Regards,

lmi

from alfodoo.

 avatar commented on July 18, 2024

Yes issue is solved on 11.0-dev. Thanks

from alfodoo.

lmignon avatar lmignon commented on July 18, 2024

Thank you for the feedback @ErpSoftAppNG

from alfodoo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.