Speed Improvement at installation
Some Typos bzr revid: fp@tinyerp.com-2656cbbc886d5175d3bc3a1c2cfd3907527e8867
This commit is contained in:
parent
254cde6528
commit
005b1e302c
|
@ -724,8 +724,14 @@ class mrp_procurement(osv.osv):
|
|||
|
||||
def check_produce(self, cr, uid, ids, context={}):
|
||||
res = True
|
||||
user = self.pool.get('res.users').browse(cr, uid, uid)
|
||||
for procurement in self.browse(cr, uid, ids):
|
||||
if procurement.product_id.product_tmpl_id.supply_method=='buy':
|
||||
if procurement.product_id.seller_ids:
|
||||
partner = procurement.product_id.seller_ids[0].name
|
||||
if user.company_id and user.company_id.partner_id:
|
||||
if partner.id == user.company_id.partner_id.id:
|
||||
return True
|
||||
return False
|
||||
if procurement.product_id.product_tmpl_id.type=='service':
|
||||
res = res and self.check_produce_service(cr, uid, procurement, context)
|
||||
|
@ -736,6 +742,7 @@ class mrp_procurement(osv.osv):
|
|||
return res
|
||||
|
||||
def check_buy(self, cr, uid, ids):
|
||||
user = self.pool.get('res.users').browse(cr, uid, uid)
|
||||
for procurement in self.browse(cr, uid, ids):
|
||||
if procurement.product_id.product_tmpl_id.supply_method=='produce':
|
||||
return False
|
||||
|
@ -743,6 +750,9 @@ class mrp_procurement(osv.osv):
|
|||
cr.execute('update mrp_procurement set message=%s where id=%d', ('No supplier defined for this product !', procurement.id))
|
||||
return False
|
||||
partner = procurement.product_id.seller_ids[0].name
|
||||
if user.company_id and user.company_id.partner_id:
|
||||
if partner.id == user.company_id.partner_id.id:
|
||||
return False
|
||||
address_id = self.pool.get('res.partner').address_get(cr, uid, [partner.id], ['delivery'])['delivery']
|
||||
if not address_id:
|
||||
cr.execute('update mrp_procurement set message=%s where id=%d', ('No address defined for the supplier', procurement.id))
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
<record model="ir.sequence" id="seq_purchase_order">
|
||||
<field name="name">Purchase Order</field>
|
||||
<field name="code">purchase.order</field>
|
||||
<field name="prefix">PO/</field>
|
||||
<field name="prefix">PO</field>
|
||||
<field name="padding">3</field>
|
||||
</record>
|
||||
</data>
|
||||
|
|
|
@ -265,7 +265,7 @@
|
|||
</field>
|
||||
</record>
|
||||
<record model="ir.ui.view" id="view_scrum_meeting_form">
|
||||
<field name="name">scrum.meeting.form</field>
|
||||
<field name="name">Scrum Meeting</field>
|
||||
<field name="model">scrum.meeting</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
|
|
Loading…
Reference in New Issue