Skip to Content
Menu
This question has been flagged
1 Reply
1165 Views

Hi Odoo Mates,

I have a simple question I have make a new field in res.partner

It called pos_conter I want it to pe as the number of the pos order for this customer

So I did this

class ResPartnerInherit(models.Model):
    _inherit =
"res.partner"

   
pos_counter = fields.Integer(string='Pos Order Counter', compute="_compute_pos_order")

   
def _compute_pos_order(self):
       
for rec in self:
            rec.pos_counter = rec.pos_order_count

 

but the pos_order_count is disappear from the customer field

 

And if I remove the code it show up again

 

What did you suggest to solve this problem.

 

Thanks.


Avatar
Discard
Author Best Answer

Please any answer or my q is not clear?

Avatar
Discard
Related Posts Replies Views Activity
1
Aug 24
544
3
May 24
7270
1
Sep 23
1342
0
Aug 23
556
2
Apr 23
2597