diff options
| author | Jalpesh Patel (OpenERP) <pja@tinyerp.com> | 2012-10-12 11:58:46 +0530 |
|---|---|---|
| committer | Jalpesh Patel (OpenERP) <pja@tinyerp.com> | 2012-10-12 11:58:46 +0530 |
| commit | 4e088306d1df4e181aa22ab14746ce6a485538ae (patch) | |
| tree | 12778ab659475d40dda9f6018719277dae6162d4 | |
| parent | ac999ede8a60097341bab7b8c5ed8babd1d97d4b (diff) | |
[IMP]interchange sequence of buttons in Purchase order form like: [Receive Products] [Receive Invoice]
bzr revid: pja@tinyerp.com-20121012062846-27zef8nxmwiaz5wz
| -rw-r--r-- | addons/purchase/purchase.py | 6 | ||||
| -rw-r--r-- | addons/purchase/purchase_view.xml | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/addons/purchase/purchase.py b/addons/purchase/purchase.py index d1fa271b1b1..2cabe6e8559 100644 --- a/addons/purchase/purchase.py +++ b/addons/purchase/purchase.py @@ -114,7 +114,7 @@ class purchase_order(osv.osv): if state=='done': res[oid][0] += nbr or 0.0 res[oid][1] += nbr or 0.0 - else: + else:L878 res[oid][1] += nbr or 0.0 for r in res: if not res[r][1]: @@ -877,10 +877,10 @@ class purchase_order_line(osv.osv): context = {} # - check for the presence of partner_id and pricelist_id - if not pricelist_id: - raise osv.except_osv(_('No Pricelist !'), _('Select a price list for a supplier in the purchase form to choose a product.')) if not partner_id: raise osv.except_osv(_('No Partner!'), _('Select a partner in purchase order to choose a product.')) + if not pricelist_id: + raise osv.except_osv(_('No Pricelist !'), _('Select a price list for a supplier in the purchase form to choose a product.')) res = {'value': {'price_unit': price_unit or 0.0, 'name': name or '', 'product_uom' : uom_id or False}} if not product_id: return res diff --git a/addons/purchase/purchase_view.xml b/addons/purchase/purchase_view.xml index 446c17578cb..85dde22e3e2 100644 --- a/addons/purchase/purchase_view.xml +++ b/addons/purchase/purchase_view.xml @@ -205,8 +205,8 @@ <button name="picking_ok" states="except_picking" string="Manually Corrected"/> <button name="invoice_ok" states="except_invoice" string="Manually Corrected"/> <button name="purchase_approve" states="confirmed" string="Approve Order" class="oe_highlight" groups="purchase.group_purchase_manager"/> - <button name="view_invoice" string="Receive Invoice" type="object" attrs="{'invisible': ['|', ('invoice_method','=','picking'), '|', ('state','!=', 'approved'), ('invoiced','=',True) ]}" class="oe_highlight"/> <button name="view_picking" string="Receive Products" type="object" attrs="{'invisible': ['|', ('shipped','=',True), ('state','!=', 'approved')]}" class="oe_highlight"/> + <button name="view_invoice" string="Receive Invoice" type="object" attrs="{'invisible': ['|', ('invoice_method','=','picking'), '|', ('state','!=', 'approved'), ('invoiced','=',True) ]}" class="oe_highlight"/> <button name="action_cancel_draft" states="cancel,sent,confirmed" string="Set to Draft" type="object" /> <button name="purchase_cancel" states="draft,confirmed,sent" string="Cancel"/> <field name="state" widget="statusbar" statusbar_visible="draft,sent,approved,done" statusbar_colors='{"except_picking":"red","except_invoice":"red","confirmed":"blue"}' readonly="1"/> |
