Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
1 Răspunde
3846 Vizualizări

I made a related field that takes the information from purchase orders to the stock picking. I want to make that if the field is empty, in stock picking let the users edit that field.

from odoo import fields, models, api class Picking(models.Model): _inherit = 'stock.picking' analytic_account_id = fields.Many2one( string='Project', related='purchase_id.analytic_account_id', store=True, readonly=False) ​


Thats what I have. What should I add?

Imagine profil
Abandonează
Cel mai bun răspuns

In XML add this <field name="analytic_account_id" attrs="{'readonly':[('analytic_account_id', '!=', False)]}"

Imagine profil
Abandonează
Related Posts Răspunsuri Vizualizări Activitate
1
dec. 22
4011
2
dec. 22
6108
3
nov. 20
4265
1
mai 17
3682
0
mar. 17
3553