← Back to team overview

openerp-brazil-team team mailing list archive

[Bug 792586] Re: [l10n_br_stock] onchange_fiscal_operation_category_id nao acha regra que tem estado em branco

 

Corrigido na revisão 189

** Changed in: openerp.pt-br-localiz
       Status: New => Fix Released

** Changed in: openerp.pt-br-localiz
     Assignee: (unassigned) => Renato Lima - http://www.akretion.com (renatonlima)

** Changed in: openerp.pt-br-localiz
    Milestone: None => inicial-0.0

** Changed in: openerp.pt-br-localiz
   Importance: Undecided => Medium

-- 
You received this bug notification because you are a member of OpenERP
Brazil Team, which is the registrant for OpenERP Brazilian Portuguese
Localization (pt_BR).
https://bugs.launchpad.net/bugs/792586

Title:
  [l10n_br_stock] onchange_fiscal_operation_category_id nao acha regra
  que tem estado em branco

Status in OpenERP Brasil:
  Fix Released

Bug description:
  Isso tb vale para os outros lugares que temos regras de mudança de posiçao fiscais:
  se um estado nao é informado na regra e que nehnuma regra com o estado bate, entao tem que aplicar a regra generica sem estado especificado.

  No caso tem que trabalhar em cima de patch parecido desse:

  
  === modified file 'l10n_br_stock/stock.py'
  --- l10n_br_stock/stock.py	2011-05-31 02:11:50 +0000
  +++ l10n_br_stock/stock.py	2011-06-03 21:35:09 +0000
  @@ -104,6 +104,10 @@
           fsc_pos_id = self.pool.get('account.fiscal.position.rule').search(cr, uid, [('company_id','=',company_id), ('from_country','=',from_country),('from_state','=',from_state),('to_country','=',to_country),('to_state','=',to_state),('use_picking','=',True),('partner_fiscal_type_id','=',partner_fiscal_type),('fiscal_operation_category_id','=',fiscal_operation_category_id)])
           if not fsc_pos_id:
               fsc_pos_id = self.pool.get('account.fiscal.position.rule').search(cr, uid, [('company_id','=',company_id), ('from_country','=',from_country),('from_state','=',from_state),('to_country','=',to_country),('to_state','=',to_state),('use_picking','=',True),('fiscal_operation_category_id','=',fiscal_operation_category_id)])
  +        if not fsc_pos_id:
  +            fsc_pos_id = self.pool.get('account.fiscal.position.rule').search(cr, uid, [('company_id','=',company_id), ('from_country','=',from_country),('from_state','=',from_state),('to_country','=',to_country),('to_state','=',False),('use_picking','=',True),('fiscal_operation_category_id','=',fiscal_operation_category_id)])
  +
  +
           
           if fsc_pos_id:
               obj_fpo_rule = self.pool.get('account.fiscal.position.rule').browse(cr, uid, fsc_pos_id)[0]
  @@ -175,4 +179,4 @@
   
           return super(stock_picking, self)._invoice_hook(cr, uid, picking, invoice_id)
   
  -stock_picking()
  \ No newline at end of file
  +stock_picking()


References