mirror of
https://github.com/bringout/oca-ocb-technical.git
synced 2026-04-21 18:32:03 +02:00
19.0 vanilla
This commit is contained in:
parent
5faf7397c5
commit
2696f14ed7
721 changed files with 220375 additions and 91221 deletions
|
|
@ -2,6 +2,7 @@
|
|||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
from ast import literal_eval
|
||||
from lxml import etree
|
||||
|
||||
import odoo.tests
|
||||
|
||||
|
|
@ -30,4 +31,22 @@ class TestUi(odoo.tests.HttpCase):
|
|||
]).unlink()
|
||||
self.assertEqual(self.env['res.partner'].with_context(**action_context).new().company_type, "company")
|
||||
|
||||
self.start_tour("/web", 'debug_menu_set_defaults', login="admin")
|
||||
self.start_tour("/odoo", 'debug_menu_set_defaults', login="admin")
|
||||
|
||||
def test_vat_label_string(self):
|
||||
""" Test changing the vat_label field of the user company_id.
|
||||
It be immediately reflected on partners views.
|
||||
"""
|
||||
partner = self.env['res.partner'].create({'name': 'Jean'})
|
||||
# call get view to warm the cache
|
||||
partner.get_view()
|
||||
|
||||
self.env.user.company_id.country_id = self.env.ref('base.us')
|
||||
self.env.user.company_id.country_id.vat_label = "TVA"
|
||||
view = partner.get_view()
|
||||
|
||||
arch = etree.fromstring(view['arch'])
|
||||
for node in arch.iterfind(".//field[@name='vat']"):
|
||||
self.assertEqual(node.get("string"), 'TVA')
|
||||
for node in arch.iterfind(".//label[@for='vat']"):
|
||||
self.assertEqual(node.get("string"), 'TVA')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue