← Back to team overview

openerp-india team mailing list archive

Re: [Bug 1061494] Re: Purchase order fiscal position

 

*** This bug is a duplicate of bug 1055813 ***
    https://bugs.launchpad.net/bugs/1055813

I don't think it;s a duplicate of...because it doesn't have anything to do
with audit ...i unninstall the audittrail module and it didn't changed
anything...a put audit rules for purchase order, purchase order line and
the same result.

The only thing that work is to modify the function from purchase_order_line
class

    def onchange_product_uom(self, cr, uid, ids, pricelist_id, product_id,
qty, uom_id,
            partner_id, date_order=False, fiscal_position_id=False,
date_planned=False,
            name=False, price_unit=False, notes=False, context=None):
        """
        onchange handler of product_uom.
        """
        if not uom_id:
            return {'value': {'price_unit': price_unit or 0.0, 'name': name
or '', 'notes': notes or'', 'product_uom' : uom_id or False}}
        return self.onchange_product_id(cr, uid, ids, pricelist_id,
product_id, qty, uom_id,
-           partner_id, date_order=date_order,
fiscal_position_id=fiscal_position_id, date_planned=date_planned,
+          partner_id, date_order=date_order, date_planned=date_planned,
            name=name, price_unit=price_unit, notes=notes, context=context)

Hope to improve in the addons.


On Thu, Oct 4, 2012 at 1:42 PM, Amit Bhavsar (Open ERP) <
1061494@xxxxxxxxxxxxxxxxxx> wrote:

> *** This bug is a duplicate of bug 1055813 ***
>     https://bugs.launchpad.net/bugs/1055813
>
> ** This bug has been marked a duplicate of bug 1055813
>    [Trunk/6.1]Cannot add category to employee with audittrail
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1061494
>
> Title:
>   Purchase order fiscal position
>
> Status in OpenERP Addons (modules):
>   New
>
> Bug description:
>   onchange_product_id() got an unexpected keyword argument
>   'fiscal_position_id'
>
>   Needs refactoring of onchange_product_id() and onchange_product_uom()
>   from purchase order line.
>
>   Create a new purchase order, try to create a new purchase order
>   line(even from client and web) it will raise an error
>
>   2012-10-04 09:27:44,492 21014 ERROR ? openerp.osv.osv: Uncaught exception
>   Traceback (most recent call last):
>     File
> "/usr/local/lib/python2.7/dist-packages/openerp-6.1-py2.7.egg/openerp/osv/osv.py",
> line 121, in wrapper
>       return f(self, dbname, *args, **kwargs)
>     File
> "/usr/local/lib/python2.7/dist-packages/openerp-6.1-py2.7.egg/openerp/osv/osv.py",
> line 176, in execute
>       res = self.execute_cr(cr, uid, obj, method, *args, **kw)
>     File
> "/usr/local/lib/python2.7/dist-packages/openerp-6.1-py2.7.egg/openerp/addons_6.1/audittrail/audittrail.py",
> line 495, in execute_cr
>       return fct_src(cr, uid, model, method, *args)
>     File
> "/usr/local/lib/python2.7/dist-packages/openerp-6.1-py2.7.egg/openerp/osv/osv.py",
> line 164, in execute_cr
>       return getattr(object, method)(cr, uid, *args, **kw)
>     File
> "/usr/local/lib/python2.7/dist-packages/openerp-6.1-py2.7.egg/openerp/addons_6.1/purchase/purchase.py",
> line 710, in onchange_product_uom
>       name=name, price_unit=price_unit, notes=notes, context=context)
>   TypeError: onchange_product_id() got an unexpected keyword argument
> 'fiscal_position_id'
>   2012-10-04 09:27:44,493 21014 ERROR ? openerp.netsvc:
> onchange_product_id() got an unexpected keyword argument
> 'fiscal_position_id'
>
>   We are using Openerp 6.1 with the latest revision of server, addons...
>
>   I tried on runbot too and it raised the same error.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/openobject-addons/+bug/1061494/+subscriptions
>


-- 
Fekete Mihai
Software Developer
www.erpsystems.ro

-- 
You received this bug notification because you are a member of OpenERP
Indian Team, which is subscribed to OpenERP Addons.
https://bugs.launchpad.net/bugs/1061494

Title:
  Purchase order fiscal position

Status in OpenERP Addons (modules):
  New

Bug description:
  onchange_product_id() got an unexpected keyword argument
  'fiscal_position_id'

  Needs refactoring of onchange_product_id() and onchange_product_uom()
  from purchase order line.

  Create a new purchase order, try to create a new purchase order
  line(even from client and web) it will raise an error

  2012-10-04 09:27:44,492 21014 ERROR ? openerp.osv.osv: Uncaught exception
  Traceback (most recent call last):
    File "/usr/local/lib/python2.7/dist-packages/openerp-6.1-py2.7.egg/openerp/osv/osv.py", line 121, in wrapper
      return f(self, dbname, *args, **kwargs)
    File "/usr/local/lib/python2.7/dist-packages/openerp-6.1-py2.7.egg/openerp/osv/osv.py", line 176, in execute
      res = self.execute_cr(cr, uid, obj, method, *args, **kw)
    File "/usr/local/lib/python2.7/dist-packages/openerp-6.1-py2.7.egg/openerp/addons_6.1/audittrail/audittrail.py", line 495, in execute_cr
      return fct_src(cr, uid, model, method, *args)
    File "/usr/local/lib/python2.7/dist-packages/openerp-6.1-py2.7.egg/openerp/osv/osv.py", line 164, in execute_cr
      return getattr(object, method)(cr, uid, *args, **kw)
    File "/usr/local/lib/python2.7/dist-packages/openerp-6.1-py2.7.egg/openerp/addons_6.1/purchase/purchase.py", line 710, in onchange_product_uom
      name=name, price_unit=price_unit, notes=notes, context=context)
  TypeError: onchange_product_id() got an unexpected keyword argument 'fiscal_position_id'
  2012-10-04 09:27:44,493 21014 ERROR ? openerp.netsvc: onchange_product_id() got an unexpected keyword argument 'fiscal_position_id'

  We are using Openerp 6.1 with the latest revision of server, addons...

  I tried on runbot too and it raised the same error.

To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-addons/+bug/1061494/+subscriptions


References