It also occurs when deleting a record (i.e. a menuitem one) from a
custom module and putting it back in place by reinstalling the original
module that creates it.

Example:

a) 'crm' module creates menuitem with id = 'menu_crm_case_categ0_act_leads'
b) 'my_custom_module' deletes the record:
<delete model="ir.ui.menu" id="crm.menu_crm_case_categ0_act_leads" />
c) Reinstall 'crm' module
d) Recharge official translation

^ The terms are still being shown in english, even when the translation
terms exists in ir_translation

-- 
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to OpenERP Project Group.
https://bugs.launchpad.net/bugs/893474

Title:
  Translations not working after overwrite a report

Status in OpenERP Server:
  Confirmed

Bug description:
  After overwriting an existing report, the translation will not work.

  For example, I need to rewrite the template of payslip.pdf, the
  following definition works well:

  <report auto="False" id="hr_payroll.salary_payslip" model="hr.payslip"
                        name="payslip.pdf" rml="mymodule/report/payslip.rml" 
string="Employee PaySlip" />

  But there is also a method has to be override in payslip_report class,
  so I create a new class to extend it like this:

  from datetime import datetime
  from hr_payroll.report.report_payslip import payslip_report

  class payslip_report(payslip_report):

      def get_month(self, obj):
          return datetime.strptime(obj.date, '%Y-%m-%d').strftime('%Y-%m')

  As we know, to make it effect, we must register it with report_sxw:

  report_sxw.report_sxw('report.payslip.pdf', 'hr.payslip',
  'mymodule/report/payslip.rml', parser=payslip_report)

  This brings the error: The report "report.payslip.pdf" already exists!

  Then I change both report definition and register name to
  'report.my.payslip.pdf', but the translation never works.

  Look into report relative classes, I realize the name is used for
  searching translation table in report_sxw._translate method.

  Any solution?

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

_______________________________________________
Mailing list: https://launchpad.net/~c2c-oerpscenario
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~c2c-oerpscenario
More help   : https://help.launchpad.net/ListHelp

Reply via email to