Browse Source

last changes

pull/3/head
EliseDup 9 years ago
parent
commit
0a17e62595
  1. 7
      beesdoo_purchase/models/purchase_order.py
  2. 8
      beesdoo_purchase/views/purchase_order.xml

7
beesdoo_purchase/models/purchase_order.py

@ -8,10 +8,3 @@ class PurchaseOrder(models.Model):
class PurchaseOrderLine(models.Model):
_inherit = 'purchase.order.line'
product_id = fields.Many2one('product.product', string='Product',
domain=['&',('purchase_ok', '=', True),('template.main_seller_id','=','order_id.partner_id')], change_default=True, required=True)
@api.onchange('order_id')
def _onchange_order_id(self):
print "changed", self.order_id, self.order_id.partner_id

8
beesdoo_purchase/views/purchase_order.xml

@ -1,14 +1,14 @@
<openerp>
<data>
<!-- <record model="ir.ui.view" id="beesdoo_purchase_order_form_view">
<record model="ir.ui.view" id="beesdoo_purchase_order_form_view">
<field name="name">beesdoo.purchase.order.form.view</field>
<field name="model">purchase.order</field>
<field name="inherit_id" ref="purchase.purchase_order_form" />
<field name="arch" type="xml">
<field name="product_id" position="attributes">
<attributes domain="[('main_seller_id','=','parent.partner_id')]" />
</field>
</field>
</record>
-->
</data>
</openerp>
Loading…
Cancel
Save