- Jul 07, 2020
-
-
Loan (lse) authored
The idea is to avoid useless SQL request as the searching process is heavy (have to look the word in several field and can be in translation tables). As we at some point fetch all the searched product we do it at the beginning and use its information to gain performance on other queries. Execution time in e-shop for "test" on client database (160 000 product with 4500 published): - Before: ~ 7 sec - After: ~ 2 sec OPW-2256662 closes odoo/odoo#54196 X-original-commit: 9103c889e9858d370680612a48a79b4a615e9b58 Signed-off-by:
Jérémy Kersten (jke) <jke@openerp.com>
-
- Jun 29, 2020
-
-
Anh Thao Pham (pta) authored
- Install Calendar - In Settings, activate another languange (e.g. French) - Configure language of another user (User A) than the current one with the French language - At this point, the language of the users are: * Current User: English * User A: French - Go to Calendar and create a Meeting - Edit the Meeting and in Invitations tab, add User A and click on "Send mail" button - In debug mode, go to Settings > Technical > Emails The email sent to User A is in French, except for the first sentence of the body that is in English ("Your Calendar Attendee Information") That sentence is the model description that is not translated to the recipient language. opw-2269155 closes odoo/odoo#53406 Signed-off-by:
Nicolas Lempereur (nle) <nle@odoo.com>
-
- Jul 07, 2020
-
-
jvm-odoo authored
Issue - Create a content in a course with type "web page" - Access it frontend and add a "text - image" block, edit the image as a video - save - The video is displayed correctly - Go into full-screen The video is not displayed at all. Cause The content is added after the page and page widgets are started Solution Trigger the widgets start method OPW-2290233 closes odoo/odoo#54135 Signed-off-by:
Jason Van Malder (jvm) <jvm@odoo.com>
-
- Jul 06, 2020
-
-
Denis Ledoux authored
Use case: - `./odoo-bin -d mydb -i website` - `./odoo-bin -d mydb -i base_automation` - `./odoo-bin -d mydb -u website,base_automation` ``` odoo.addons.base.models.ir_model: Deleting 2652@ir.model.fields (base_automation.field_base_automation__website_published) odoo.addons.base.models.ir_model: Deleting 2651@ir.model.fields (base_automation.field_base_automation__website_url) odoo.addons.base.models.ir_model: Deleting 2650@ir.model.fields (base_automation.field_base_automation__website_path) ``` The issue comes from the fact: - `website` adds multiple website related fields on `ir.actions.server` https://github.com/odoo/odoo/blob/30e94d305f9cffa816ddc213e0b9329c0263c145/addons/website/models/ir_actions.py#L16-L18 - `base.automation` inherits by delegation of the `ir.actions.server` fields thanks to `delegate=True` on its field `action_server_id` https://github.com/odoo/odoo/blob/30e94d305f9cffa816ddc213e0b9329c0263c145/addons/base_automation/models/base_automation.py#L37 - when `base_automation` is installed after `website` when `_reflect_model` is called, the website related fields on `ir.actions.server` are well in the `_fields` of the `base.automation` model, and there an xmlid for these fields is created e.g. `field_base_automation__website_published` https://github.com/odoo/odoo/blob/30e94d305f9cffa816ddc213e0b9329c0263c145/odoo/addons/base/models/ir_model.py#L881-L882 - during the `-u website,base_automation`, `_reflect_model` on `base.automation` is called before the website related fields coming from its inherits on `ir.actions.server` are added in its `_fields`, and is not recalled after they are added, when the `website` module is loaded and these website related fields are added on `ir.actions.server`. Because of this, at the end of the upgrade, in the `ir.model.data` `_process_end`, as the xmlids of these fields have not been loaded, they are being deleted, because the ORM considers these fields were dropped from the source code because their xmlids have not been loaded during the upgrade. Adding the model `base.automation` in the `inherits_children` of `ir.actions.server` when the delegate field `action_server_id` is added make sure `_reflect_model` is called on `base.automation` after the website related field are loaded on the model `ir.actions.server`, and therefore ensure the xmlids are properly loaded, therefore preventing the fields deletion. Additionaly, `delegate` and `inherits` are supposed to be equivalent, it's just two ways to do the same thing. Before this revision, when using `delegate`, `base.automation` is not in the `inherits_children` of `ir.actions.server`: ``` In [1]: env['ir.actions.server']._inherits_children Out[1]: set() ``` while, by converting the `delegate` to an `inherits`: ```diff diff --git a/addons/base_automation/models/base_automation.py b/addons/base_automation/models/base_automation.py index 196ebe9965f..c073150386a 100644 --- a/addons/base_automation/models/base_automation.py +++ b/addons/base_automation/models/base_automation.py @@ -30,11 +30,12 @@ class BaseAutomation(models.Model): _name = 'base.automation' _description = 'Automated Action' _order = 'sequence' + _inherits = {'ir.actions.server': 'action_server_id'} action_server_id = fields.Many2one( 'ir.actions.server', 'Server Actions', domain="[('model_id', '=', model_id)]", - delegate=True, required=True, ondelete='restrict') + required=True, ondelete='restrict') active = fields.Boolean(default=True, help="When unchecked, the rule is hidden and will not be executed.") trigger = fields.Selection([ ('on_create', 'On Creation'), ``` it is: ``` In [1]: env['ir.actions.server']._inherits_children Out[1]: {'base.automation'} ``` closes odoo/odoo#54119 X-original-commit: 3fd162db Signed-off-by:
Denis Ledoux (dle) <dle@odoo.com>
-
- Jul 07, 2020
-
-
jvm-odoo authored
Issue Chrome - Sales > Product - Select a file - Change something in the file - Re-select it Nothing changed Cause Chrome doesn't trigger change on input if the file is the same Solution Clear the input value after the parse_preview so we can load a new file even if the preview failed. OPW-2288191 closes odoo/odoo#54165 X-original-commit: f7d2bdf6 Signed-off-by:
Jason Van Malder (jvm) <jvm@odoo.com>
-
- Jul 06, 2020
-
-
lejeune quentin authored
When we upgrade the IoT we wait that the version of box match with the last version of IoT Box before to refresh. We make a request to '/hw_proxy/get_version' to get the actual version. In Jinja this response give a float. We compare this value with a string using '===' who want that the format match. So we doesn't compare the format of values but only the value by putting only '=='. closes odoo/odoo#54138 X-original-commit: 06f9baae Signed-off-by:
Quentin Lejeune (qle) <qle@odoo.com>
-
Olivier Dony authored
The CDN implementation for resources works by matching well-know attributes (`href`, `src`, `action`) that hold URLs matching the CDN filters and injects the CDN prefix. However 13.0 introduced lazy loading for assets in #32181, so the attributes are now prefixed with `data-` and replaced at runtime. This PR updates the tag matching in order to cover both variants of attribute names. closes odoo/odoo#54144 Signed-off-by:
Toufik Benjaa (tbe) <tbe@odoo.com>
-
- Jul 03, 2020
-
-
Andrea Grazioso (agr-odoo) authored
Create four promotion programs: if the order > 1500 than 10% discount if the order > 1750 than 15% discount if the order > 2000 than 20% discount if the order > 2500 than 25% discount Take a product with a price of $300 and add 5 to cart > the 10% discount is correctly applied. Add 1 more product (6) > it should now qualify for 15% discount, but it stays at 10% Add 1 more product (7) > it (correctly) gets the 20% discount The 25% discount does not get applied until 11 of the product is in the cart, even though it should qualify at 9 If you then decrease the quantity, the right discount will sometimes display. This occur because when the order amount change and the new total is used to match the right promo the previously applied discount is not removed from the amount. This occur as side effect of 1d59785 in which the amount has to be kept in order to avoid discount line removal on cart update. opw-2285656 closes odoo/odoo#54034 Signed-off-by:
Nicolas Martinelli (nim) <nim@odoo.com>
-
- Jul 06, 2020
-
-
jvm-odoo authored
Issue - Go to Accounting / Customers / Invoices - Pick any invoice not paid - Action: Generate a Payment Link - Open the link - Refresh the page having Javascript disabled - Click the Pay Now button Traceback Cause If JS is not loaded, the values in the form fields are not bound as expected. It can also happen with slow connections and fast click on the button at the loading. Before the JS is entirely loaded (as it is lazy-loaded). Solution Button disabled by default, wait the page to be loaded and then activate the button OPW-2255760 closes odoo/odoo#53904 Signed-off-by:
Jason Van Malder (jvm) <jvm@odoo.com>
-
Odoo's Mergebot authored
During TempusDominus autobinding to fields matching its default classes (like `.datetimepicker-input` used by our DatePicker widget) and no config was previously provided to the library (like when we disable it on mobile), an unsafe access to the config's `_options` property results into an error as the config is `undefined`. This PR fixes it by first checking for config existence before attempting to access its property. It also extracts the DatePicker widget's input setter to allow overriding it and preventing from calling the `datetimepicker` lib when not initialized (like on mobile). opw-2242880 closes odoo/odoo#54032 Forward-port-of: odoo/odoo#54005 Related: odoo/enterprise#11635 Signed-off-by:
Adrien Dieudonné (adr) <adr@odoo.com> Signed-off-by:
Pierre Paridans <pparidans@users.noreply.github.com>
-
- Jul 05, 2020
-
-
Odoo Translation Bot authored
-
- Jul 03, 2020
-
-
Pierre Paridans authored
During TempusDominus autobinding to fields matching its default classes (like `.datetimepicker-input` used by our DatePicker widget) and no config was previously provided to the library (like when we disable it on mobile), an unsafe access to the config's `_options` property results into an error as the config is `undefined`. This commit fixes it by first checking for config existence before attempting to access its property. Note: as this is a fix inside a library, a comment is added to make clear. Also similar fixes where already done in the same file. opw-2242880 X-original-commit: c05982c2
-
Pierre Paridans authored
This commit extracts the DatePicker widget's input setter to allow overriding it and preventing from calling the `datetimepicker` lib when not initialized (like on mobile). Note: this change will be used on enterprise. opw-2242880 X-original-commit: ca84753f
-
Martin Trigaux authored
The time to display the check in/check out time was hardcoded to HH:mm:ss while other locales may use different formats. Use the appropriate time utils to retrieve the right format that uses the time format from the res.lang record. Fixes odoo/odoo#50527 closes odoo/odoo#54018 Signed-off-by:
Martin Trigaux (mat) <mat@odoo.com>
-
Aaron Bohy authored
Some widgets allow the edition in readonly (e.g. boolean_toggle, priority...). In this case, the changed value is saved directly. Before this commit, this didn't work in (main) list views: the widget was updated with the new value, but it wasn't saved in db, so the change was lost at reload. This was due to the list controller not being correctly aware of its mode ('edit' or 'readonly'), on which the basic controller relies to determine whether a change must be saved directly or not. With this commit, a list is always in 'readonly', except when a row is being edited, in which case it is in 'edit'. Issue reported on task 2288963 closes odoo/odoo#54049 Signed-off-by:
Julien Mougenot (jum) <jum@odoo.com>
-
Nasreddin (bon) authored
Issue - Install English and French languages - Create a customer contact and assign french as his language - Create a product with correct names in both languages. For example 'French product name' and 'English product name' for easy reference. - Create an inventory transfer with the french customer as contact - Add the product that you created - Print > Delivery Slip The report will show in the lines: """ French product name English product name """ Cause Getting product description without checking partner language. Solution If partner is set, get product description with partner language in context. opw-2280490 closes odoo/odoo#53977 Signed-off-by:
Nicolas Martinelli (nim) <nim@odoo.com>
-
- Jul 02, 2020
-
-
Laurent Smet authored
- Fix discount indicator with 100.0% discount. - Fix reported tax amount with group of taxes. - Fix reported tax_base_amount with foreign currency. - Fix invoice summary according the facturx xsd. closes odoo/odoo#53895 Related: odoo/enterprise#11606 Signed-off-by:
Quentin De Paoli (qdp) <qdp@openerp.com>
-
Laurent Smet authored
-
Laurent Smet authored
-
- Jul 03, 2020
-
-
Jorge Pinna Puissant authored
fine-tuning of bf8a9af1 - Employees > Configuration > Activity Planning > Plans and ensure the activities have different responsible; - Create a new Employee, assign a Manager (a different user then the one connected, you can assign Marc Demo for example); - Click launch plan. Before this commit, the activity type responsible is ignored and the responsible for all activities is the connected user. Now, the responsible for the activities are assigned taking into account the activity type configuration. opw-2265631 closes odoo/odoo#54033 Signed-off-by:
Jorge Pinna Puissant (jpp) <jpp@odoo.com>
-
Florent de Labarre authored
If no country is specified on a partner, self.country_id is res.country() and partner_country_code contains res.country(). In the next line the code was comparing `res.country()` with `'BE'`, raising a warning. closes odoo/odoo#54020 X-original-commit: ef9fc11d Signed-off-by:
Martin Trigaux (mat) <mat@odoo.com>
-
- Jul 02, 2020
-
-
Nicolas Martinelli authored
- Activate more than one language - Install sale_quotation_builder - Create a new quotation model without website description - Create a SO using this model, Save The 'Please update translations of' is displayed for the website desctiption, although it is empty: when clicking on the link, no record is shown. This happens because an empty HTML field always contains at least `<p><br></p>`. We do not consider the latter string for translation. opw-2274203 closes odoo/odoo#53998 X-original-commit: 86741c65 Signed-off-by:
Nicolas Martinelli (nim) <nim@odoo.com>
-
Nicolas Martinelli authored
Ensure deterministic sorting for slides with the same sequence. opw-2283154 closes odoo/odoo#53996 Signed-off-by:
Nicolas Martinelli (nim) <nim@odoo.com>
-
oco-odoo authored
Before that, since https://github.com/odoo/odoo/commit/71ee252dc43fd0e2b86ba8079c31915544e528eb , negative invoice lines were not supported by thoses taxes. Nor were miscellaneous entries. To make them work, we change the way tags are assigned to cash basis taxes : instead of copying them from the invoice, sign included, we now change their sign when appropriate, so that the resulting cash basis move can be treated like any regular miscellaneous operation by the tax report (so, always applying a factor of 1 to its lines' balance). Doing that also allows us to re-simplify the code used in the tax report and tax audit computation to manage cash basis entries, and makes the cash basis entry more standard. This is also a usability improvement: now the user does not have to search for the original invoice to understand how the CABA entries are going to impact the report: it's always managed like a misc. operation, so he can just trust the signs of the tags. v13 version of https://github.com/odoo/odoo/pull/53085 closes odoo/odoo#53503 Related: odoo/enterprise#11372 Signed-off-by:
Laurent Smet <smetl@users.noreply.github.com>
-
Andrea Grazioso (agr-odoo) authored
Create an invoice, fill document type "(61) Nota de Crédito Electrònica". Save. Action will be blocked by a warning: document type is invalid. Some options in the document type should not be shown as they can not be used in the customer invoices and customer credit note. opw-2286623 closes odoo/odoo#53971 Signed-off-by:
Nicolas Martinelli (nim) <nim@odoo.com>
-
jerome hanke (jhk) authored
Steps to reproduce: - install website, website_mass_mailing - go to website, edit and add a popup window (you should see warning banner stating that a newsletter popup is present on this window). Save. - go to settings > languages > load a new language (fr_FR for example) and translate the website - go back to the website > select the new language > click the TRANSLATE button Previous behavior: the warning banner is not editable, also click the "Edit popup" button does nothing Current behavior: clicking the "Edit popup" button triggers an alert with a quick explanatory text opw-2280188 closes odoo/odoo#53557 Signed-off-by:
Nicolas Lempereur (nle) <nle@odoo.com>
-
Antoine Prieels authored
Trying to call display_refresh or update_url when no screen was connected to the IoT Box and the default distant_display was created resulted in an error. closes odoo/odoo#53967 Signed-off-by:
Quentin Lejeune (qle) <qle@odoo.com>
-
Nicolas Martinelli authored
In case the COA is imported in the system, the `chart_template_id` of the company remains empty while the accounting is usable. However, in this case it's impossible to open a POS session. We leave the warning in the POS config but avoid blocking the user. opw-2286640 closes odoo/odoo#53963 Signed-off-by:
Nicolas Martinelli (nim) <nim@odoo.com>
-
alt-odoo authored
It can happen that a partner has no name, we should not crash and leave it empty instead. closes odoo/odoo#53903 Signed-off-by:
Nicolas Martinelli (nim) <nim@odoo.com>
-
jev authored
Before this fix, the search on the supplierinfo had an undeterministic result. When testing odoo/addons/purchase_stock/tests/test_reordering_rule.py:66 `def test_procure_not_default_partner`, it may fail at line 120. It sets 2 suppliers: - Firstly, the `default_vendor` (let's assume id=120) - Then, the `secondary_vendor` (let's assume id=121) It then runs a procurement without setting the supplier and assert that the partner of the resulting PO line should be `default_vendor`. The return of odoo/addons/product/models/product.py:574 `def _prepare_sellers` depends on Postgres when the supplierinfo sequence, min_qty and price are the same for multiple records. By adding the `id` to the `.sorted`, the result will order correctly in that case. opws-2272627 -2282081 -2287079 And PS-BE via CSC reported more cases without opw. closes odoo/odoo#53939 Signed-off-by:
Nicolas Martinelli (nim) <nim@odoo.com>
-
- Jul 01, 2020
-
-
Andrea Grazioso (agr-odoo) authored
Select a sales order. Go to action > generate payment link. Open private browser, reach the link. User will receive error message because of access denied to the res.partner data. opw-2287534 closes odoo/odoo#53910 Signed-off-by:
Nicolas Martinelli (nim) <nim@odoo.com>
-
Nasreddin (bon) authored
Issue - Install 'Accounting' app - Create tax A and tax B for 5%, make sure they are NOT included in price - Create a tax C as a group that includes Tax A and B - Go to any bank journal and create a statement line for 100 dlls - Click Reconcile - Select Manual Operations - Select any account - Add Tax C - Check on 'Tax Included in Price' Wrong calculation. Cause Not considering forced 'Tax Included in Price' ('force_price_include'),when cumulating tax included amount. opw-2280714 closes odoo/odoo#53906 X-original-commit: ef63297fa2513a58b4dd6db7f44a46643decce66 Signed-off-by:
Nicolas Martinelli (nim) <nim@odoo.com>
-
Simon Lejeune authored
Write is overridden on reserved move lines to make sure the quants are correctly updated. It is divided in two parts: if you update the reserved quantity and if you update a characteristic. If somehow both are updated in the same call (which doesn't happen in the standard interface), then the quants are unreserved two times, which is wrong. This issue showcased by [0] and on databases where the reserved quantities are made editable by customization. We grouped the two update in one, such as the TODO indicated us since a long, long time. We removed `result_packaged_id` from the trigger because it should not impact the reservation whatsoever. We needed to remove a tricky logic in the stock move's backordering part but it was fishy anyway. [0] eac8c06e closes odoo/odoo#53794 Signed-off-by:
Simon Lejeune (sle) <sle@openerp.com>
-
Andrea Grazioso (agr-odoo) authored
Go to Payments view Select multiple confirmed payments, click on Actions>Send receipt by email Only for the first payment will be sent an email. This occur because in composition mode 'comment' (the default) mail composer sens the mail to a single record Adding a duplicate action to handle multi send Updating translation accordingly opw-2278971 closes odoo/odoo#53725 Signed-off-by:
Nicolas Lempereur (nle) <nle@odoo.com>
-
Samuel Degueldre authored
Previously, duplicating a block inside of the newsletter popup would cause the subscribe input and button to disappear. Actually, it disappears when you use most options of the left panel, because selecting an option refreshes the public widgets, which destroys them and starts them again, but for some reason, the subscribe widget's destroy method makes it d-none, but only removes that class if the subscribe input is not inside of a modal. This commit fixes that by not using d-none on the subscribe input group at all. We keep the d-none removals for databases which may have the button saved in a disabled state. task-2244780 closes odoo/odoo#50286 Signed-off-by:
Quentin Smetz (qsm) <qsm@odoo.com>
-
snd authored
opws: 2269230, 2248760 When a database has a lot of projects with many tasks, and needs to send a lot of feedback mails, the cron tries to send mails to all tasks at the same time, thus it times out. This fix will allow to treat projects one at a time so that when the cron times out, it will not restart from the beginning. closes odoo/odoo#53896 Signed-off-by:
Yannick Tivisse (yti) <yti@odoo.com>
-
Julien Mougenot authored
closes odoo/odoo#38301 Signed-off-by:
Aaron Bohy (aab) <aab@odoo.com>
-
- Jun 30, 2020
-
-
Xavier ALT authored
In case a field is limited to specific groups on the model, those fields are discarded from `fields_view_get()` but can still be referenced by some filters on the search view causing a traceback (see #53797) Model: ```python class MyModel(models.Model): my_field = fields.Char(groups='base.group_system') ``` Search views: ```xml <search string="My Model"> <filter name="group_myfield" context="{'group_by': 'my_field'}"/> </search> ``` This commit ensure those filter are correctly discarded. OPW-2284621 closes odoo/odoo#53886 X-original-commit: 6a1eb6d332c5a9bcb9f1d2d1034e6640f5cd2317 Signed-off-by:
Aaron Bohy (aab) <aab@odoo.com> Signed-off-by:
Xavier ALT <xavieralt@users.noreply.github.com>
-
- Jun 29, 2020
-
-
Goffin Simon authored
Steps to reproduce the bug: - Let's consider a fixed tax T of 5€ - Create a customer invoice with one line L - Set T on L and 100% discount on L Bug: A tax of -5€ was due by the customer (meaning the seller must return 5€ to the customer) opw:2283875 closes odoo/odoo#53788 Signed-off-by:
oco-odoo <oco-odoo@users.noreply.github.com>
-
- Jun 30, 2020
-
-
Anh Thao Pham (pta) authored
- Install Accounting, Point of Sale - Go to Accounting > Configuration > Taxes - Create 2 taxes (e.g. Tax 15% and Tax 21%) - Go to Accounting > Configuration > Fiscal Positions - Create a new Fiscal Postion with the following line for Tax Mapping: * Tax on Product: Tax 21% * Tax to Apply: Tax 15% - Go to Point of Sale > Products > Products - Create a new Product (e.g. Test Product) with "Tax 15%" and "Tax 21%" in Customer Taxes (Make sure that the Tax 15% is the same than the one for the "Tax to Apply" in the Fiscal Position) - Go to Point of Sale and configure a POS: * Activate "Fiscal Position per Order" and choose the created Fiscal Position * Add Bank as Payment Method - Start a POS session - Search "Test Product" and add it - Click on Tax button and select the created Fiscal Position - Proceed to payment - Choose Bank and validate - Exit the POS session - Click on "CLOSE" and "VALIDATE CLOSING & POST ENTRIES" An error message appeared with the following message: "Cannot create unbalanced journal entry" When closing and posting entries, an account move and account move lines are created from the session orders. For each order lines, taxes are computed from taxes on product and fiscal position of the order. In this case, the product has 2 taxes applied (Tax 15% and Tax 21%). Due to the chosen Fiscal Position, the Tax 15% is applied instead of Tax 21%. For the order line, Tax 15% is applied 2 times. But during the account move lines generation, the original Tax 15% and the converted Tax 15% are merged together, because they represent the same tax (same model id). So the Tax 15% is only applied once, which results on unbalanced amounts during reconciliation. In Sales, for the same case, the tax is only applied once. To stay consistent with Sales behavior, the tax will also be applied once in Point of Sale. opw-2278826 closes odoo/odoo#53549 Signed-off-by:
Nicolas Martinelli (nim) <nim@odoo.com>
-