Coder Social home page Coder Social logo

Comments (15)

yelizariev avatar yelizariev commented on September 23, 2024

If I understand correctly, odoo don't save readonly attributes after this commit
2328040

from odoo.

pna-odoo avatar pna-odoo commented on September 23, 2024

Hello,

Thanks for your good explanation, I have reproduce same at my end.

So I am confirming this issue. Regarding your fix i am not agree with you as you cannot remove readonly, instead we have to improve code so we can save it.

Thanks,
Pinakin

from odoo.

msh-odoo avatar msh-odoo commented on September 23, 2024

Hello Yelizariev,

This does not looks an issue at all, this is the desired behavior of Odoo web-client that it does not send values of readonly field.

"Its design decision"

If you want to save readonly field's value forcefully then you can achieve logically in your module(there are many ways), like you can override create method and apply the logic which adds readonly field and its value(may be by recalling onchange method from create in your case) in vals which going to save.

Readonly fields are for informative purpose.

For further information you can go through comment : https://bugs.launchpad.net/openobject-client/+bug/378824/comments/18

Hope this will help.

Thanks,
Mohammed

from odoo.

yelizariev avatar yelizariev commented on September 23, 2024

Mohammed, this is issue about company_id field, is not about design decision. I only need company_id corresponded to warehouse_id. I agree with any solution on this.

Another solution is as Fabien commented https://bugs.launchpad.net/openobject-client/+bug/378824/comments/2

May be you can do what you need with a hidden but not readonly field.

from odoo.

KangOl avatar KangOl commented on September 23, 2024

No, the solution is to change the field "company_id" to be a stored related field.

from odoo.

rafaelbn avatar rafaelbn commented on September 23, 2024

cc @pedrobaeza @antespi @yajo @sergio-incaser @carlos-incaser

from odoo.

rafaelbn avatar rafaelbn commented on September 23, 2024

@yelizariev it's much more effective if you make a PR to Odoo fixing it.
Also you can make a PR to https://github.com/OCA/OCB fixing the problem and have it solve it

from odoo.

JKE-be avatar JKE-be commented on September 23, 2024

@rafaelbn, @yelizariev it's not an issue for Odoo... so don't need to be fixed. Odoo don't save the readonly field, it is by design.
Confirmed by @KangOl (#171 (comment)) and https://bugs.launchpad.net/openobject-client/+bug/378824/comments/2

from odoo.

andreinl avatar andreinl commented on September 23, 2024

@JKE-be, so storing Warehouse with company_id from another Company is not a problem?

from odoo.

JKE-be avatar JKE-be commented on September 23, 2024

@andreinl not exactly. The fact that field readonly is not saved is not an issue. The fact that you can store "Warehouse with company_id from another Company" yes. But the discuss was confusing. The fix as suggest @KangOl will be to change the field "company_id" to be a stored related field. or keep the onchange but remove the readonly and add the invisibility.

from odoo.

andreinl avatar andreinl commented on September 23, 2024

@JKE-be The other solution can be intercept create() and write() and write company_id from warehouse. Users will always see the right company as onchange works fine. It seems to me that this is less intrusive solution.

from odoo.

Yenthe666 avatar Yenthe666 commented on September 23, 2024

Dear @yelizariev,

Thank you for reporting this issue!
At this point Odoo 6.0, 6.1 and 7.0 are no longer supported for bugsfixes anymore, which means we will no longer handle these bugs.
If you still face this issue on Odoo 8, 9 or 10 we'd like to ask you to create a new issue on how to reproduce this.
Our apologies.

Regards,
Yenthe

from odoo.

yelizariev avatar yelizariev commented on September 23, 2024

@Yenthe666
this issue is for 8.0 and need updates mentioned here #171 (comment)

from odoo.

Yenthe666 avatar Yenthe666 commented on September 23, 2024

@JKE-be and @KangOl could you guys give feedback on this and get this going?

from odoo.

Yenthe666 avatar Yenthe666 commented on September 23, 2024

Hi @yelizariev ,

Again a bit thank you for the report.
At this point Odoo 8 is no longer supported as Odoo only supports three versions (9.0, 10.0, 11.0 at the moment).
If you can still reproduce this issue on Odoo 9, Odoo 10 or Odoo 11 we encourage you to create a new bug report.

Regards,
Yenthe

from odoo.

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.