Before this commit if you would call phone_parse() but not pass along a
country code it would crash. This is reproducable by calling the phone_parse
function and not setting a country on the contact. In this case you would get
the following traceback:
AttributeError: 'bool' object has no attribute 'upper'.
This happens because the phonenumbers library tries to upper() the region but
if Odoo doesn't have a country set it passes along False. By doing a fallback
to 'None' the phonenumbers library will natively handle this and the user in
the UI does not get a traceback.
Task-2852953
closesodoo/odoo#112699
X-original-commit: 9b75d7ac1a912ff3d15c393a6a23018a18b3b9bb
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Co-authored-by: Thibault Delavallee <tde@odoo.com>
Before this commit there is no clean/easy way to do nice xpath's on the divs.
By giving them a name we can do a xpath expr with @name=''] which is not as errorprone.
closesodoo/odoo#105142
X-original-commit: f37251ff76359a4b8c05facc1f7449a2e1eea7fb
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
Description of the issue/feature this PR addresses:
Current behavior before PR:
Desired behavior after PR is merged:
closesodoo/odoo#103274
Forward-port-of: odoo/odoo#103207
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Description of the issue/feature this PR addresses:
Current behavior before PR:
Desired behavior after PR is merged:
closesodoo/odoo#103273
Forward-port-of: odoo/odoo#103206
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Before this commit the creation of the message(s) was done within a for loop in a big function.
Due to this there is no easy nor clean way to override and modify values on the mail.message record(s).
By placing the preparation of message data in a subfunction it can be overwritten and modified as wanted.
closesodoo/odoo#102825
X-original-commit: 6d6d7c12ac456e648bd35645f9617cd1d8ff60e6
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Current behavior before PR: You have to find the right menu/view and then take
over the ID stored on the activity (through export) to find back the record.
This is annoying, painful and error prone.
Desired behavior after PR is merged: By adding a smartbutton the user can
quick-navigate to the related record in a second. This allows for quickly
finding and opening records which is usually handy when debugging things or
finding back related records.
Task-2868230
closesodoo/odoo#91230
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Current behavior before PR: You have to find the right menu/view and then take
over the ID stored on the email to find back the record. This is annoying,
painful and error prone.
Desired behavior after PR is merged: By adding a smartbutton the user can
quick-navigate to the related record in a second. This allows for quickly
finding and opening records which is usually handy when debugging things.
Task-2868230
closesodoo/odoo#91228
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
As by now pretty much all of the internet runs on HTTPS & it is
recommended everywhere let's do so our in our manifest do.
closesodoo/odoo#91281
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
By adding an index the cost of the SQL's will be a lot lower.
See #86615 for info/sample
closesodoo/odoo#87287
X-original-commit: 44b445eba6287348211e002235e1d003b45f2d6e
Signed-off-by: William André (wan) <wan@odoo.com>
With this commit we can now call a hook when we want to modify the code for this route.
Before this commit the only way to modify/extend this would be by taking over a big part of the code.
closesodoo/odoo#84907
Signed-off-by: Laurent Smet <las@odoo.com>
Before this commit there was no easy/clean way to extend the domain, searchbar sorting and filtering.
By adding it in subfunctions we can do clean extending of the domains/filters
closesodoo/odoo#84912
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
With this commit we can now call a hook when we want to modify the code for this route.
Before this commit the only way to modify/extend this would be by taking over a big part of the code.
closesodoo/odoo#84905
Signed-off-by: Arnold Moyaux <arm@odoo.com>
Before this commit the only way to modify the domain is to completely override portal_my_quotes/portal_my_orders.
Since this function is so big this is not clean/easy to do.
By creating a separate function we can simply override it and we can reuse the same domain in two places.
closesodoo/odoo#84886
X-original-commit: ff50844da0e4423372746e767f482a2a71148be4
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Before this commit it is technically possible for "return_picking_line" to be a recordset instead of a record.
By taking the first element ([0]) we're sure it is always a record instead of a recordset to work with.
closesodoo/odoo#82578
X-original-commit: 705e60a9531fe0b042fd32a5dfc934bede15558c
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Before this fix there is no real way to influence the VAT validation.
This can be problematic though as in some cases external platforms push data to you
on which you don't really have control. If an external software pushes an invalid VAT
and your database has the option 'Verify VAT Numbers' checked on there is no way
for you to bypass this though.
This means that before this commit you have to always run VAT number checks on all data,
no matter if they come through the frontend or backend.
After this commit you can supply a context key 'no_vat_validation' though.
This way you could skip doing VAT number validations on (some) records while still
enforcing this in the UI.
This allows you to have crons/external API's push any VAT number while enforcing full
validation through the UI.
This opens up the best of both worlds.
closesodoo/odoo#80843
X-original-commit: d31bf866e1556327f634e20d6d845d67143e2a06
Signed-off-by: Olivier Colson <oco@odoo.com>
Before this commit the only way to modify the domain is to completely override portal_my_invoices.
Since this function is so big this is not clean/easy to do.
By creating a separate function we can simply override it and we can reuse the function on two places.
closesodoo/odoo#77446
X-original-commit: b7effc442cd7ff47e00718adf5b1af43e9f326ee
Signed-off-by: Florian Gilbert <FlorianGilbert@users.noreply.github.com>
Before this commit if you found a message and wanted to open the related record you would need to find it manually by finding the right view and then using the ID stored on the message to open it.
By adding a smartbutton the user can quick-navigate to the related record in a second.
This allows for quickly finding and opening records which is usually handy when debugging things.
Ref Task-2660873
closesodoo/odoo#77675closesodoo/odoo#77803
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Before this fix if a user updated the module hr_timesheet the ir.config_parameters would be reset.
By wrapping them in a no-update they're no longer updated with a module update and thus kept as set by the user.
closesodoo/odoo#72732
X-original-commit: 369529cb15ec01cde1538c189535ce6d41685268
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Before this update if you would update the module the default livechat details would be reset.
By wrapping it in a no-update they're not updated with a module update.
closesodoo/odoo#70029
X-original-commit: 45c330c1e44d6a9526596b5ec1dfbff317579b68
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Before this commit it was rather painful/cluncky to find a way to remove this block.
By setting a name on the block we can easily xpath it to replace it or add extra content within.
This makes it easier for external devs to influence this view.
closesodoo/odoo#68010
X-original-commit: d418e4e16a46a0d499e606598b3524eabd19e5fd
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Before this commit it is rather hard/unsafe to xpath into this view.
As the view is huge and quite some HTML elements are used a few times (table for example) it is risky. Especially since some enterprise modules build further on this.
After this commit all major elements have a name which allow easy xpathing for inheritance.
closesodoo/odoo#66131
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Before this commit not all messages where translated/translatable.
By adding _() to them they're now translatable. This means that if somebody puts OdooBot to another language the messages would be translated.
closesodoo/odoo#65787
X-original-commit: 355ae0d59a446a87d195b6749e66cd732f21ae2f
Signed-off-by: William André (wan) <wan@odoo.com>
Before this commit Odoo tries to compare an 'account.fiscal.position' id with an 'account.fiscal.position' record.
This causes a 'Comparing apples and oranges' warning in the logs and is not the right way to do this.
This is a fix for d89fa970e8e5b07f1b9a396e6ee02db7fdd136e4 where this issue was introduced
closesodoo/odoo#63029
X-original-commit: d9a1b28144523ece2c6fa4329f3ae4b7ff4a38ec
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Before this commit the tax report links to Brazil while the chart of account is Switzerland.
By changing the ref it now installs the tax report with the right country set.
closesodoo/odoo#61806
X-original-commit: 93e44b6d85564b6fde99053ccb16399e224477e3
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
Before this commit some of the <p> elements had no id or name.
This means you need to do uglier or more risky xpath expressions.
By adding names on the elements we can easily xpath to the element itself which results in less changes of breaking or having issues.
closesodoo/odoo#56096
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Before this commit there is no label shown at the top of the invite if
the user hasn't done anything with the invite or if he chose
'Tentative'. Now it always shows the informative label. This commit
also adds the description of a meeting subject as it can be
interesting and important in many cases.
closesodoo/odoo#43121
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Before this commit the tokens from payment providers (PayPal, Stripe) are shown in plain text in the onboarding wizard.
This means that anyone with accounting rights can grab & copy tokens for PayPal & Stripe.
After this commit they're shielded off with a password=True option so they're not directly readable and copyable.
Steps to reproduce: Open an Odoo instance, go to Accounting > Invoices and click on the 'Set Payments' option for the onboarding wizard.
Next choose Paypal or Credit card in the dialog and see how tokens are shown in plain-text.
closesodoo/odoo#54861
X-original-commit: 65e201ecee3bc145c2ae76d59b6d2fd31c737872
Signed-off-by: Olivier Dony (odo) <odo@openerp.com>
Before this commit knowing which _order option was having issues may
be non-obvious.
This changes makes it a bit more obvious.
closesodoo/odoo#54703
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Before this commit if you have a quant that has a location linked of the type 'view' you'd get this warning
but you would not know about which location this was and figuring that out is not trivial for most people.
After this commit users get notified about which location is of the type 'view' and can directly correct it if they want to.
closesodoo/odoo#51137
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
Before this commit it was difficile to express xpath into these
group elements. By setting a name on the elements we no longer need to
use indexes or longer xpath expressions and can easily xpath on the
element itself right away. This will be more tolerant to form view
redesign.
closesodoo/odoo#48083
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Before this commit the documentation had quite some samples with 'customer', '=', True. Since in V13 this field on the res.partner model no longer exists we've removed it.
closesodoo/odoo#48453
X-original-commit: 2215d803aa35cdd13ab7f989c807bc7f575aaa8e
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
The sentence was a bit odd before this commit. After this commit it reads easier and it is more logical.
closesodoo/odoo#46617
Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
Before this commit the sentence was a bit weird as a date is not on the future but in the future. This commit resolves this.
closesodoo/odoo#45548
X-original-commit: b335c33655a707f71fbc01929f5eea2e659e7215
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Before this commit the purchase_rfq action had two context keys
defined. One being empty {} and one with quotation_only set to
True. After this commit there is just one context (the one that is
actually used and applied) on the action.
Empty key added in 12.0 at 6138686d41b
Second key added in 13.0 at b5cea7e2b6closesodoo/odoo#44990
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Before this commit there were two buttons on this wizard with the same name 'create_invoices' that do different things. One creates the invoice and the other one creates and opens the invoices. By setting an unique ID on both buttons we can do a clean and easy xpath. Something like button[@id='create_invoice_open'] instead of having to use indexes or dangerous behaviours
closesodoo/odoo#44072
Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
Two of the UserErrors mentioned 'quantites' instead of 'quantities' before this commit. This commit fixes the terms and the translation file.
closesodoo/odoo#43902
X-original-commit: 68a849bfb507c5fa14b869a44ea50bf88ff3ce1f
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Before this commit the search would search for phone numbers that contained a part of a string. The mobile phone would only look at exact matches so if we'd search for '0492700' the only result would be contacts with this exact match. After this commit every mobile phone that contains '0492700' will match and be shown. This allows for quickly finding customers by a partial mobile, just like the phone number does.
closesodoo/odoo#43752
X-original-commit: 8a34a6a66f3f06829231e5d0ba536fcdd27d17ea
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
The constraint view in Odoo has no good quick search options to filter/group and find
specific constraints easily.
This commits allows you to easily group and search for the most used values of
constraints. This will make the finding of constraints easier for functional people.
closesodoo/odoo#41288
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
When you create a new bank account from an account.move there is a very high chance that you're creating the bank account for this specific vendor. As we can create a bank account from the account.move we can directly set the vendor (account holder) if there is one set
closesodoo/odoo#42788
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
`run_action_` hooks don't always return a value, in which case
invoking run() over RPC will raise a TypeError (though the call itself
should still succeed).
Somewhat oddly, "standard" hooks (e.g. in mail) generally do
things safely and return a `False`, but the "builtin" hooks (code,
object create and object write) tend to return nothing, and thus break
when invoked over RPC.
Fixes#42268Closes#42272closesodoo/odoo#42804
X-original-commit: 9ad01ef242afc9602d4a1470cb321374129f29b9
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
The field user_id was created twice in the model with the same values and options, only a different help message. This removes the duplicated one.
closesodoo/odoo#40542
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Without the product_uom_category_id set you cannot edit this tree view. There is a domain [('category_id', '=', product_uom_category_id)] triggered from this view whcich is not fulfilled if we do not have the field set in the tree.
closesodoo/odoo#40186
X-original-commit: 4873e5ef3192480fdd3889331f13ff0e10ba5d6a
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
Creating a location without name does not make sense, it is the only
field of the model
Fixesodoo/odoo#38571
Adapt in master to make the field required at the model
closesodoo/odoo#38718
X-original-commit: 0823062efa96c316b9bca743891c8a1c701d130d
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
When creating a state from the Cities list, the country was not prefilled.
Use the parent record
Closes#30135
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Before this PR quite a lot of the lines on the fiscal positions
"EU landen", "Niet-EU landen" and "Installatie en Afstandsverkopen"
where mapped wrong, some of the lines even referred to another
tax percentage.
Changes:
- The tax "BTW te vorderen laag (inkopen) 9%" on the product
mapped to the tax to apply named "Inkopen import buiten EU laag 6%",
which should be "Inkopen import buiten EU laag 9%" to correctly
counterpart the taxes. All the other changes where similar,
either invalid tax rates where applied or it mapped to a wrong category.
- "Verkopen/omzet overig diensten" on the product would map to
"Installatie/afstandsverkopen buiten EU" as the VAT to apply.
This should map to "Verkopen export buiten EU".
- Added 3 accounts for Omzet NL handelsgoederen 1,
Omzet NL handelsgoederen 2 and Omzet NL handelsgoederen 3
- Mapped the 3 accounts to the fiscal position
"Installatie en Afstandsverkopen" their relevant lines.
- Removed purchase taxes from fiscal position "Installatie en Afstandsverkopen" .
- Mapped the right taxes to the three fiscal positions their VAT tabels.
- Updated .pot file to add the three extra accounts.
Closes#31403closesodoo/odoo#32130
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
When an import failed because of a specific cell, the error was
Error cell found while reading XLS/XLSX file: #N/A
Add the line and column index in the error for better debugging
Translate error message
Cherry-pick of odoo/odoo#30729 in master
Closes#30729closesodoo/odoo#31677
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>