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

How to set default date in stock.move base on date in stock.picking

By
oohaah
on 11/26/13, 4:52 AM 1,206 views

in stock.move form , when create stock.move i want field date to set default base on date in stock.picking.

0

Omal Bastin

--Omal Bastin--
1146
| 6 6 8
Kochi, Kerala, India
--Omal Bastin--

Swiming deep into openERP/ODOO

Omal Bastin
On 11/27/13, 2:29 AM

Let say the date field in stock.move is date_move and date field in stock.picking is date_picking . The field move_lines is a one2many from picking to stock move. So where ever the move_lines fields is using in the view add an attribute - context - to the view. For example

<field name="move_lines"  context="{'default_date_move':parent.date_picking}"/>

This will automatically select the date specified in the date_picking field to date_move when adding new stock moves.The problem is after adding the stock moves if anyone changes the date in date_picking it will not effect on the moves that are already added.

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: 11/26/13, 4:52 AM
Seen: 1206 times
Last updated: 8/9/16, 11:28 AM