[MERGE] forward port branch saas-15 up to 00829a0beb
This commit is contained in:
@@ -10,8 +10,12 @@ from odoo.tools.misc import mod10r
|
||||
def _is_l10n_ch_postal(account_ref):
|
||||
""" Returns True iff the string account_ref is a valid postal account number,
|
||||
i.e. it only contains ciphers and is last cipher is the result of a recursive
|
||||
modulo 10 operation ran over the rest of it.
|
||||
modulo 10 operation ran over the rest of it. Shorten form with - is also accepted.
|
||||
"""
|
||||
if re.match('^[0-9]{2}-[0-9]{1,6}-[0-9]$', account_ref or ''):
|
||||
ref_subparts = account_ref.split('-')
|
||||
account_ref = ref_subparts[0] + ref_subparts[1].rjust(6,'0') + ref_subparts[2]
|
||||
|
||||
if re.match('\d+$', account_ref or ''):
|
||||
account_ref_without_check = account_ref[:-1]
|
||||
return mod10r(account_ref_without_check) == account_ref
|
||||
|
||||
@@ -1818,7 +1818,7 @@
|
||||
</record>
|
||||
|
||||
<record id="pcg_4661" model="account.account.template">
|
||||
<field name="name">>Datorii din operaţiuni de fiducie</field>
|
||||
<field name="name">Datorii din operaţiuni de fiducie</field>
|
||||
<field name="code">4661</field>
|
||||
<field name="user_type_id" ref="account.data_account_type_current_liabilities"/>
|
||||
<field name="chart_template_id" ref="ro_chart_template"/>
|
||||
|
||||
@@ -92,8 +92,7 @@
|
||||
<field name="reconcile" eval="False"/>
|
||||
<field name="user_type_id" ref="account.data_account_type_current_assets"/>
|
||||
<field name="chart_template_id" ref="vn_template"/>
|
||||
<field name="name">Thuế GTGT được khấu trừ của hàng hóa, dịch vụ
|
||||
</field>
|
||||
<field name="name">Thuế GTGT được khấu trừ của hàng hóa, dịch vụ</field>
|
||||
</record>
|
||||
<record id="chart1332" model="account.account.template">
|
||||
<field name="code">1332</field>
|
||||
@@ -151,7 +150,7 @@
|
||||
</record>
|
||||
<record id="chart1388" model="account.account.template">
|
||||
<field name="code">1388</field>
|
||||
<field name="reconcile" eval="False"/>
|
||||
<field name="reconcile" eval="True"/>
|
||||
<field name="user_type_id" ref="account.data_account_type_current_assets"/>
|
||||
<field name="chart_template_id" ref="vn_template"/>
|
||||
<field name="name">Phải thu khác</field>
|
||||
@@ -160,7 +159,7 @@
|
||||
|
||||
<record id="chart141" model="account.account.template">
|
||||
<field name="code">141</field>
|
||||
<field name="reconcile" eval="False"/>
|
||||
<field name="reconcile" eval="True"/>
|
||||
<field name="user_type_id" ref="account.data_account_type_current_assets"/>
|
||||
<field name="chart_template_id" ref="vn_template"/>
|
||||
<field name="name">Tạm ứng</field>
|
||||
@@ -333,8 +332,7 @@
|
||||
<field name="reconcile" eval="False"/>
|
||||
<field name="user_type_id" ref="account.data_account_type_non_current_assets"/>
|
||||
<field name="chart_template_id" ref="vn_template"/>
|
||||
<field name="name">Cây lâu năm, súc vật làm việc và cho sản phẩm
|
||||
</field>
|
||||
<field name="name">Cây lâu năm, súc vật làm việc và cho sản phẩm</field>
|
||||
</record>
|
||||
<record id="chart2118" model="account.account.template">
|
||||
<field name="code">2118</field>
|
||||
@@ -460,7 +458,7 @@
|
||||
<field name="reconcile" eval="False"/>
|
||||
<field name="user_type_id" ref="account.data_account_type_non_current_assets"/>
|
||||
<field name="chart_template_id" ref="vn_template"/>
|
||||
<field name="name">>Đầu tư vào công ty liên doanh</field>
|
||||
<field name="name">Đầu tư vào công ty liên doanh</field>
|
||||
</record>
|
||||
|
||||
|
||||
@@ -470,7 +468,7 @@
|
||||
<field name="reconcile" eval="False"/>
|
||||
<field name="user_type_id" ref="account.data_account_type_non_current_assets"/>
|
||||
<field name="chart_template_id" ref="vn_template"/>
|
||||
<field name="name">>Đầu tư góp vốn vào đơn vị khác</field>
|
||||
<field name="name">Đầu tư góp vốn vào đơn vị khác</field>
|
||||
</record>
|
||||
|
||||
<record id="chart2288" model="account.account.template">
|
||||
@@ -662,14 +660,14 @@
|
||||
|
||||
<record id="chart3341" model="account.account.template">
|
||||
<field name="code">3341</field>
|
||||
<field name="reconcile" eval="False"/>
|
||||
<field name="reconcile" eval="True"/>
|
||||
<field name="user_type_id" ref="account.data_account_type_current_liabilities"/>
|
||||
<field name="chart_template_id" ref="vn_template"/>
|
||||
<field name="name">Phải trả công nhân viên</field>
|
||||
</record>
|
||||
<record id="chart3348" model="account.account.template">
|
||||
<field name="code">3348</field>
|
||||
<field name="reconcile" eval="False"/>
|
||||
<field name="reconcile" eval="True"/>
|
||||
<field name="user_type_id" ref="account.data_account_type_current_liabilities"/>
|
||||
<field name="chart_template_id" ref="vn_template"/>
|
||||
<field name="name">Phải trả người lao động khác</field>
|
||||
@@ -688,7 +686,7 @@
|
||||
<field name="reconcile" eval="False"/>
|
||||
<field name="user_type_id" ref="account.data_account_type_current_liabilities"/>
|
||||
<field name="chart_template_id" ref="vn_template"/>
|
||||
<field name="name">Phải trả nội bộ về vốn kinh doanh </field>
|
||||
<field name="name">Phải trả nội bộ về vốn kinh doanh</field>
|
||||
</record>
|
||||
|
||||
<record id="chart3362" model="account.account.template">
|
||||
@@ -774,7 +772,7 @@
|
||||
</record>
|
||||
<record id="chart3388" model="account.account.template">
|
||||
<field name="code">3388</field>
|
||||
<field name="reconcile" eval="False"/>
|
||||
<field name="reconcile" eval="True"/>
|
||||
<field name="user_type_id" ref="account.data_account_type_current_liabilities"/>
|
||||
<field name="chart_template_id" ref="vn_template"/>
|
||||
<field name="name">Phải trả, phải nộp khác</field>
|
||||
@@ -801,7 +799,7 @@
|
||||
<field name="reconcile" eval="False"/>
|
||||
<field name="user_type_id" ref="account.data_account_type_current_liabilities"/>
|
||||
<field name="chart_template_id" ref="vn_template"/>
|
||||
<field name="name">Trái phiếu </field>
|
||||
<field name="name">Trái phiếu</field>
|
||||
</record>
|
||||
<record id="chart34311" model="account.account.template">
|
||||
<field name="code">34311</field>
|
||||
|
||||
@@ -380,8 +380,6 @@ class ResConfigSettings(models.TransientModel, ResConfigModuleInstallationMixin)
|
||||
def copy(self, values):
|
||||
raise UserError(_("Cannot duplicate configuration!"), "")
|
||||
|
||||
# TODO: Find replacement for 'onchange' attribute in view with dynamic
|
||||
# api.onchange(...) and migrate the onchange_module(...) accordingly.
|
||||
@api.model
|
||||
def fields_view_get(self, view_id=None, view_type='form',
|
||||
toolbar=False, submenu=False):
|
||||
@@ -403,9 +401,6 @@ class ResConfigSettings(models.TransientModel, ResConfigModuleInstallationMixin)
|
||||
modifiers = json.loads(node.get("modifiers"))
|
||||
modifiers['readonly'] = True
|
||||
node.set("modifiers", json.dumps(modifiers))
|
||||
if 'on_change' not in node.attrib:
|
||||
node.set("on_change",
|
||||
"onchange_module(%s, '%s')" % (field, field))
|
||||
|
||||
ret_val['arch'] = etree.tostring(doc, encoding='unicode')
|
||||
return ret_val
|
||||
@@ -429,6 +424,16 @@ class ResConfigSettings(models.TransientModel, ResConfigModuleInstallationMixin)
|
||||
}
|
||||
return {}
|
||||
|
||||
def _register_hook(self):
|
||||
""" Add an onchange method for each module field. """
|
||||
def make_method(name):
|
||||
return lambda self: self.onchange_module(self[name], name)
|
||||
|
||||
for name in self._fields:
|
||||
if name.startswith('module_'):
|
||||
method = make_method(name)
|
||||
self._onchange_methods[name].append(method)
|
||||
|
||||
@api.model
|
||||
def _get_classified_fields(self):
|
||||
""" return a dictionary with the fields classified by category::
|
||||
|
||||
+1
-1
@@ -33,7 +33,7 @@ PyYAML==3.12 ; python_version < '3.7'
|
||||
PyYAML==3.13 ; python_version >= '3.7'
|
||||
qrcode==5.3
|
||||
reportlab==3.3.0
|
||||
requests==2.11.1
|
||||
requests==2.20.0
|
||||
suds-jurko==0.6
|
||||
vatnumber==1.2
|
||||
vobject==0.9.3
|
||||
|
||||
@@ -28,7 +28,7 @@ pyusb==1.0.0
|
||||
PyYAML==3.12
|
||||
qrcode==5.3
|
||||
reportlab>=3.3.0
|
||||
requests==2.11.1
|
||||
requests==2.20.0
|
||||
six==1.10.0
|
||||
suds-jurko==0.6
|
||||
vatnumber==1.2
|
||||
|
||||
Reference in New Issue
Block a user