~factorlibre/openerp-fiscal-rules/openerp-fiscal-rules-translations

« back to all changes in this revision

Viewing changes to account_fiscal_position_rule/account_fiscal_position_rule.py

  • Committer: Raphaël Valyi
  • Date: 2012-12-07 21:59:45 UTC
  • Revision ID: rvalyi@gmail.com-20121207215945-j1byorneit712j50
[REF] heavy refactoring mostly in account_fiscal_position_rule_sale in order to be able to easily reuse these modules even when you need to pass more rule criteria through the primary on_changes. A good example is the Brazilian localization with the l10n_br_sale/sale.py file in the 7.0 serie

Show diffs side-by-side

added added

removed removed

Lines of Context:
102
102
 
103
103
        return domain
104
104
 
 
105
    def apply_fiscal_mapping(self, cr, uid, result, kwargs):
 
106
         result['value'].update(self.fiscal_position_map(cr, uid, **kwargs))
 
107
         return result
105
108
 
106
109
    def fiscal_position_map(self, cr, uid, partner_id=None, partner_invoice_id=None,
107
 
        partner_shipping_id=None, company_id=None, context=None):
 
110
        partner_shipping_id=None, company_id=None, context=None, **kwargs):
108
111
 
109
112
        result = {'fiscal_position': False}
110
113
        if not partner_id or not company_id: