Files
odoo_source/addons/purchase/purchase_data.yml
T
Raphael Collet cbe2dbb672 [MERGE] new v8 api by rco
A squashed merge is required as the conversion of the apiculture branch from
bzr to git was not correctly done. The git history contains irrelevant blobs
and commits. This branch brings a lot of changes and fixes, too many to list
exhaustively.

- New orm api, objects are now used instead of ids
- Environements to encapsulates cr uid context while maintaining backward compatibility
- Field compute attribute is a new object oriented way to define function fields
- Shared browse record cache
- New onchange protocol
- Optional copy flag on fields
- Documentation update
- Dead code cleanup
- Lots of fixes
2014-07-06 17:05:41 +02:00

11 lines
526 B
YAML

-
!python {model: ir.values}: |
whr = self.pool.get('stock.warehouse').browse(cr, uid, ref('stock.warehouse0'), context=context)
self.set_default(cr, uid, 'purchase.order', 'picking_type_id', whr.in_type_id.id, for_all_users=True, company_id=True, condition=False)
-
!python {model: stock.warehouse}: |
#enable purchase on main warehouse
main_warehouse = self.browse(cr, uid, ref('stock.warehouse0'), context=context)
self.write(cr, uid, main_warehouse.id, {'buy_to_resupply': True}, context=context)