odoo-app-dev / jalaali

to show odoo 15 date in jalaali format
12 stars 3 forks source link

date on a tree inside a form (one2many) has problem #3

Open odoo-app-dev opened 2 years ago

odoo-app-dev commented 2 years ago

Python class sd_contract.contract(models.Model): contract = fields.Char() info= fields.One2many('sd_contract.info', 'contract')

class sd_contract.info(models.Model): contract = fields.Many2one('sd_contract.contract') start_date= fields.Date()

XML <field name="contract"> <tree editable="top"> <field name="start_date" widget="date" /> </tree> </field>

2022-07-29 13_42_49-Odoo - OEP102-C-01-02

Problem when I change the start-date, dorpdown is in jallali, when a date is selected, it shows the date in jalali in tree view. The problem is appear after that. When I click on the form, it change the jalali date to georgian date preceding "j" letter.

In this case, if I save the form, it shows the start_date in jalali again.