Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

[POS] [9.0] change the added field

By
Gael Torrecillas
on 2/10/16, 6:03 AM 236 views

Hello,


I've a problem, I added a news field in the client, I see in the POS, but if I change the data field,, point of sale don't save this field.


I suppose I overload class res_partner's 'create_from_ui'  (res_partner in point_of_sale.py)


edit in pos : the initial data is :'toto'



after validate : but the field doesn't change


if the problem is resolved, the changes will be saved on the server

0
Gael Torrecillas
On 2/10/16, 11:19 AM

answer :


I used and it's answer this code :


class res_partner(models.Model):
_inherit = 'res.partner'
    def create_from_ui(self, cr, uid, partner, context=None):
         p_id= super(res_partner,self).create_from_ui(cr, uid, partner, context=context)
         partner_id = self.pool.get('res.partner').browse(cr, uid, [p_id])
         partner_id.hunting_licence_number = partner[u'hunting-licence-number']
        return p_id

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 2/10/16, 6:03 AM
Seen: 236 times
Last updated: 2/15/16, 3:42 AM