Browse Source

last changes

pull/114/head
EliseDup 9 years ago
committed by Rémy Taymans
parent
commit
827f395803
  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): class PurchaseOrderLine(models.Model):
_inherit = 'purchase.order.line' _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> <openerp>
<data> <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="name">beesdoo.purchase.order.form.view</field>
<field name="model">purchase.order</field> <field name="model">purchase.order</field>
<field name="inherit_id" ref="purchase.purchase_order_form" /> <field name="inherit_id" ref="purchase.purchase_order_form" />
<field name="arch" type="xml"> <field name="arch" type="xml">
<field name="product_id" position="attributes">
<attributes domain="[('main_seller_id','=','parent.partner_id')]" />
</field>
</field> </field>
</record> </record>
-->
</data> </data>
</openerp> </openerp>
Loading…
Cancel
Save