In Purchase receipt account is not autopopulated if partner is not selected
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Odoo Addons (MOVED TO GITHUB) |
Fix Released
|
Medium
|
OpenERP R&D Addons Team 3 |
Bug Description
Hi All,
In Purchase Receipt form if we will not select partner (partner is not a required field) then we can not validate it will show account field is invalid.
Solution:
1. Either account field should be visible so we can select account value.
2. Or we have to define default account field value base on journal_id and also need to change basic_onchange_
# If we didnt select partner then account_id will be false according to below function
def basic_onchange_
res = {'value': {'account_id': False}}
if not partner_id or not journal_id:
return res
journal = journal_
partner = partner_
account_id = False
if journal.type in ('sale'
elif journal.type in ('purchase', 'purchase_
else:
return res
so we need to change below line
if partner_id and journal.type in ('sale'
elif patner_id and journal.type in ('purchase', 'purchase_
plateform : ubuntu
version openerp 7.0
Related branches
- Vinay Rana (OpenERP) (community): Approve
-
Diff: 21 lines (+3/-1)1 file modifiedaccount_voucher/voucher_sales_purchase_view.xml (+3/-1)
description: | updated |
affects: | openobject-server → openobject-addons |
Changed in openobject-addons: | |
status: | Confirmed → In Progress |
Changed in openobject-addons: | |
status: | Fix Committed → Fix Released |
Hello,
The main thing is account field is invisible and it comes based on supplier. We have to make account field visible, So user can make purchase receipt without supplier.
Thank you!