19 Commits
Author SHA1 Message Date
Nguyễn Đại Dương 2d1e49d3d5 [I18N] l10n_vn: add missing translation
closes odoo/odoo#161457

Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
2024-04-22 11:51:23 +00:00
Nguyễn Đại Dương f639de48ea [IMP] l10n_vn: add VAT exemption tax
This commit add a new tax call VAT exemption for VN accounting
-Exempt goods and services
There are stipulated categories of VAT exemptions, including certain
agricultural products; goods/services provided by individuals having
annual revenue of 100 million Vietnamese dong (VND) or below; imported
or leased drilling rigs, airplanes and ships of a type that cannot be
produced in Vietnam; transfer of land use rights (LUR) (detailed
guidance is provided to specific cases); various financial services;
various securities activities including fund management; capital
assignments; foreign currency trading; debt factoring; certain types of
insurance; medical services and elderly/disabled people care service;
postal and telecommunications provided by the Government; education,
printing/publishing, public transportation, export of unprocessed
natural resources, etc.
read more at
https://taxsummaries.pwc.com/vietnam/corporate/other-taxes
https://www.sumup.com/en-gb/invoices/dictionary/vat-exemption/

Part-of: odoo/odoo#161457
2024-04-22 11:51:23 +00:00
Nguyễn Đại Dương aac2f49acf [FIX] http_routing: can't redirect the user to friendly access error
-Step to reproduce: create a custom module and try to extend method in
website_slides controller like this:
@http.route(sitemap=sitemap_slide_view)
def slide_view(self, slide, **kwargs):
    return super(WebsiteSlidesSeo, self).slide_view(slide, **kwargs)

From there, 'rule.endpoint.original_routing' will take the value from
the extend method not the original one therefore user will one again go
to the the forbidden error page which is'n friendly. We shouldn't access
original_routing because that's the "function's specific @http.route"

closes odoo/odoo#160864

-solution: we only need rule.endpoint.routing because it is the one holding the "merged @http.route accross inherited controllers".
Signed-off-by: Stéphane Debauche (std) <std@odoo.com>
2024-04-11 09:50:45 +00:00
Nguyễn Đại Dương 0e85d5a25c [IMP] website_hr_recruiment: avoid redirect 301 in 'apply now' button
-Same behaviour as [1] we should use slug(job) instead of job.id

1: a2c6ddf8158bf40f13b5c5a8b89deb3d2ae8af6b

closes odoo/odoo#160972

X-original-commit: 721a8bd4b06668dac9fad0ba08a95b7943331918
Signed-off-by: Jérémy Kersten <jke@odoo.com>
2024-04-09 11:19:47 +00:00
Nguyễn Đại Dương 0a7f6cffd6 [FIX] *: remove unnecessary t-key
-Since [1] we have add t-key for some template, but some aren't
necessary because they not load via Owl, therefore remove it to avoid
warning : "Unknown directives or unused attributes"

[1]: https://github.com/odoo/odoo/pull/130467/commits/a9b577dfcbd6c01abdc649a3ea61f80e9018832d#diff-0ba40f64ee7d28c08bdbb7273985adc0d2d2b63d8c3233aa2630e6ba4bde4df9

closes odoo/odoo#160863

Signed-off-by: Samuel Degueldre (sad) <sad@odoo.com>
2024-04-09 07:22:44 +00:00
Nguyễn Đại Dương e7187ec1c0 [IMP] website_blog: avoid redirect 301 for /blog/feed
-Before this commit the url is like /blog/1/feed then it will become a
redirect 301 url to /blog/travel-1/feed which is not good for SEO.
Therefore we change to slug(blog) to ensure no redirect occur

closes odoo/odoo#160583

X-original-commit: 3192d2d531e918a705aee2341881a80294f848dd
Signed-off-by: Jérémy Kersten <jke@odoo.com>
2024-04-05 08:57:49 +00:00
duongnguyen-viindoo fc34baedfa [FIX] project: project update description should be collaborative
we forgot to enable the feature in the description of project.update
model.

closes odoo/odoo#158257

X-original-commit: fedb0c6f4f79e762602185dee86ce8a558000783
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2024-03-20 23:15:37 +00:00
duongnguyen-viindoo c3fe38362c [FIX] mail: user_id field of model might not have type many2one
-Step to reproduce: any custom model that inherit from mail.thread then
define a field user_id but with type is char and boom error happen at
method '_message_get_suggested_recipients' because it always expect
'user_id' to be a many2one field

closes odoo/odoo#157942

-solution: need to check the type of 'user_id' also
X-original-commit: 4aaab353da1c1ddde63f2aa1232394c0b4dd6f68
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2024-03-17 00:35:02 +00:00
duongnguyen-viindoo 8d1b0f6a7a [FIX] core: post_load default value should be same as *_init_hook
-Step to reproduce: add a post_load method in the init of any module,
specify in the manifest like : 'post_load': 'post_load'. in v16 or above
Run
test_manifests of the test_lint module and we will get warning

closes odoo/odoo#156593

X-original-commit: f87473e82af8372346320ca747c1b41d3d5cf3c5
Signed-off-by: Julien Castiaux (juc) <juc@odoo.com>
2024-03-11 05:23:10 +00:00
duongnguyen-viindoo 79356e9a02 [IMP] website: more lean for industry placeholder
Type an insdustry ... is not kind of something lean for user, this
commit change industry placeholder into a more cleaner version

closes odoo/odoo#156456

Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2024-03-06 14:30:41 +00:00
duongnguyen-viindoo 76fa282741 [IMP] website: industry input should have a placeholder
-User might not know what they going to type in, this commit add a
placeholder in the input of industry selection to give a hint for user
when in website creation

closes odoo/odoo#155862

Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2024-03-01 12:10:27 +00:00
duongnguyen-viindoo 48633d2ceb [IMP] hr_expense: Team approver should not have full access to journal
Currently Team Expense Approver have full access to journal, we
shouldn't do that

closes odoo/odoo#145737

X-original-commit: 9078b6cf4770c8b3b42bde8e36c4eff5f924c7bd
Signed-off-by: de Wouters de Bouchout Jean-Benoît (jbw) <jbw@odoo.com>
2023-12-11 17:21:17 +00:00
duongnguyen-viindoo af71880cee [FIX] l10n_vn: wrong pos receivable account
-According VietNam Circular , Receivable account we should use for POS
is 131 account, not 132
see https://thuvienphapluat.vn/van-ban/Doanh-nghiep/Thong-tu-200-2014-TT-BTC-huong-dan-Che-do-ke-toan-Doanh-nghiep-263599.aspx
, select English version - Section 'Short-term receivables from
customers' to read it and we will see 132 account is not appropriate

closes odoo/odoo#145119

X-original-commit: abe25df784a9cd2bb06ba3f32fe5104160bf2fca
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
2023-12-05 22:40:48 +00:00
duongnguyen cab43d2f62 [FIX] hr_expense: journal dashboard not showing expense data
Reproduce
Create some expense, approve some of them

Expected:
On journal dashboard, The Expense Journal need to display Number of
Expense to process

Actual:
number_expenses_to_pay does not display on The Expense Journal because
we haven't override the needed method yet

Also this PR aim to improve the open_expenses_action to display
correctly the number of expense on the journal dashboard

closes odoo/odoo#139971

X-original-commit: dd3e59a8c86dab6be6d01f776e6890fb9ad97605
Signed-off-by: de Wouters de Bouchout Jean-Benoît (jbw) <jbw@odoo.com>
2023-11-03 07:34:54 +00:00
duongnguyen b8f7d1fe3e [FIX] account: wrong field name on button_open_statement_lines
This is just a typo XD

closes odoo/odoo#136536

X-original-commit: 7c5fcf4c631cfcb80786566acae7ca4484fcf048
Signed-off-by: William André (wan) <wan@odoo.com>
2023-09-25 17:11:34 +00:00
duongnguyen 67873a573a [FIX] project_purchase: Project Admin can't access project update when
having PO

Step to reproduct:
-User A with Admin Project Access Right and no Pucharse Acesss Right
-PO and Project have same analytic_account_id, with PO analytic_account
will place in 'analytic_distribution'
-User A then go to Project Update -> Access Error happen
=> Expected behaviour is to let Project Admin access it

Solutions is to let he/she see it by adding sudo() only

closes odoo/odoo#136045

X-original-commit: 249aaac7bd1a13d62c947cddb1835772659aabff
Signed-off-by: Audric Onockx (auon) <auon@odoo.com>
2023-09-21 20:38:01 +00:00
duongnguyen b69200ac46 [IMP] hr_holiday: archived employees not display in time off
closes odoo/odoo#135581

X-original-commit: ba4d3de6673bcc149a813cc40c4e088d8f0367fc
Signed-off-by: Sofie Gvaladze (sgv) <sgv@odoo.com>
2023-09-15 10:48:30 +00:00
duongnguyen 3e56aab146 [FIX] mail: wrong parameter type for add_members
The method 'add_member' has 'partner_ids' as a optional parameter , but
the thing is the test 'test_attachment_hijack' is only passing it as a
single ID off res.partner record. Let's say if somewhere we overide this
method and write something like
self.env['res.users'].search([('partner_id', 'in', partner_ids)]) , it
will fail because 'partner_ids' should be a list.

closes odoo/odoo#128759

X-original-commit: 75cb1266afa8b921f8d0ca153f5d05ad47c9b14c
Signed-off-by: Vranckx Florian (flvr) <flvr@odoo.com>
2023-07-17 18:13:53 +02:00
duongnguyen b17533c9f9 [FIX] base: fix test failing when sources are not in a folder named
'odoo'

-EX: odoo addons path is '~/odoo15/odoo/...' or '~/15.0/odoo/...'
Basically not start with 'odoo' it will get error when running tests
case on this file

closes odoo/odoo#109135

X-original-commit: 336b966f7959b4a5e716b58b25ab13d7e3f92691
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2023-01-06 11:25:02 +01:00