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

where i can make change to stock move

By
samir
on 5/23/13, 11:40 AM 787 views

hi all ,

i am trying to replace the product_qty , with two other field , qty1 and qty2 . then if i do a new : incoming product or deliver product in warehouse menu

so : product_qty = qty1 + qty2 .

1

Borni DHIFI

--Borni DHIFI--
5102
| 6 8 9
Tunis, Tunisia
--Borni DHIFI--

Techno Functional Consultant Odoo(OpenERP) 

http://www.linkedin.com/in/borni

Skype : dhifi.borni

Borni DHIFI
On 5/23/13, 11:49 AM

Hi ,

you can overwrite methode create and copy of stock.move

class stock_move(osv.osv):
    _inherit = 'stock.move'    
    _columns = {          
               'qty1': fields.float('Quantity 1 ', 
                digits_compute=dp.get_precision('Product Unit of Measure'),  
                'qty2': fields.float('Quantity 2', 
                 digits_compute=dp.get_precision('Product Unit of Measure'),                  
                 }   

    def create(self, cr, user, vals, context=None):
         product_qty=vals.get('qty1')+vals.get('qty2')
         vals['product_qty']=product_qty 
         return super(stock_move, self).create(cr, user, vals, context)

stock_move()

Thanks.

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

0 follower(s)

Stats

Asked: 5/23/13, 11:40 AM
Seen: 787 times
Last updated: 3/16/15, 8:10 AM