Commit Graph
140847 Commits
Author SHA1 Message Date
Ernesto Tejeda ef4bf7c936 [FIX] account: call method with expected singleton recordset
closes odoo/odoo#44877

X-original-commit: 4c5aea410577fab3166d3f05951ac0886406bd24
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2020-02-07 14:29:44 +00:00
Nicolas Martinelli 4b58342743 [FIX] utm: record creation
Make sure `is_website` is an existing field of the model at creation.

opw-2192139

closes odoo/odoo#44870

X-original-commit: 5daf25f2c693c17e75223f8e3502d5c4121cb3b5
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-02-07 14:03:09 +00:00
Victor Feyens bfad367afe [IMP] doc: some precisions/fixes
closes odoo/odoo#44869

X-original-commit: c8c311b8d463d1db7f3700c1bb5dac076abab905
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2020-02-07 14:00:13 +00:00
Victor Feyens 3e9b73b1ee [IMP] doc: document the api.model decorator
X-original-commit: efa3a148cb178693b73af054cd6e19870d068454
2020-02-07 14:00:12 +00:00
Laurent Smet ddfb12d063 [IMP] account: Improve fixes https://github.com/odoo/odoo/commit/ab1ae1a854eab4a38aa2866bfc9d8ca9aa4013be
Explanation about flushing in action_switch_invoice_into_refund_credit_note:
Because the 'type' is set before 'amount_total', 'amount_total' is recomputed with the
wrong type and then make the condition badly evaluated.
For some reason, the field wasn't badly recomputed before:
https://github.com/odoo/odoo/commit/020e2a5e85036976b309b439582d70b5b775e54f

closes odoo/odoo#44868

X-original-commit: a82e62d1925ebfd4f49360fdc5f3a8d28de5a0d9
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2020-02-07 13:48:22 +00:00
Jorge Pinna Puissant 271a4b79a3 [FIX] sale, website_sale: salesperson emails from assignation of online so
- install e-commerce;
- In the website settings, orders followup, set a salesperson;
- By something as a public user;
- Pay the order.

Before this commit:
- 2 emails where create to assign the salesperson to the SO, but these
    emails didn't have a from and the salesperson didn't receive the
    emails.
- 1 email was also create to assign the salesperson to the contact, this
    mail is not necessary.

Now, only one email that assigns the salesperson to the SO is sent,
with a correct from address.

opw-2189683

closes odoo/odoo#44861

X-original-commit: 7c08eb158858b9573d3d84a0b54df0bfca754105
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
2020-02-07 13:19:27 +00:00
Arnaud Joset a98f0af9e2 [FIX] mail: _finalize_tracking was not properly flushed
Before this commit, no recompulation were performed at the end of the
tracking procedure.  This is because the main flush() occurred before
the tracking of values.  The absence of flushing is problematic in the
case where the tracking is used to create/update records.

closes odoo/odoo#44851

X-original-commit: c60da49a1d81fa73b60135185d5b706eec771475
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2020-02-07 12:43:44 +00:00
qsm-odoo ef03b02af6 [FIX] web_editor, website, *: editor notify method must be synchronous
* website_form

Some technical explanations:

The method became async because the `setTarget` call which was in there
became `async` since it performed an UI update. As this method being
async is a problem with some snippets, it is best to keep it synchronous
for now. For this, the UI update in `setTarget` is removed and becomes
the responsibility of the caller. Nothing relied on it except one code,
which is solved by calling `onFocus` before the UI update which occurs
on focus, as it is already the case in master.

closes odoo/odoo#44850

X-original-commit: 53bba0660237abbcadc9675fd89ec94a2a31e130
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-02-07 12:43:25 +00:00
Samuel Degueldre 91fb0d3020 [FIX] website: fix number of column option broken layout
Normally, the number of column option adjusts the width of each column
after changing their number so that they always fit in one row. In
previous versions, the sequence of the code was correct thanks to
jQuery's deferreds executing their then callbacks synchronously if the
promise was already resolved. However, native Promise objects always
put their then callbacks in the microtask queue, and this was resulting
in the column width classes being recalculated before their number had
actually changed.

This commit fixes that by calculating the width of the columns based on
how many columns there will be after addition/removal. It also
introduces a new field on the option that is used to update the UI so
that it displays the correct number.

closes odoo/odoo#44849

X-original-commit: 58804d6ea375629b07748bc442eaccc401c56d1b
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-02-07 12:34:06 +00:00
Nicolas Martinelli e8a580f3b7 [FIX] point_of_sale: round prices
- Activate 'Round Globally'
- Create a 21 % tax included in price
- Create a product costing 21.5
- Add the product in a pos order, make the payment

The `price_subtotal` is saved as `17.768595`, while it should be
`17.77`.

When these amounts are added in [1] (coming from [2]), it can lead to an
inconsistency in the final computation, preventing the closing because
of an unbalanced journal entry.

Actually, the total and the subtotal must always be rounded following
the currency precision, as done in [3] and [4].

It was probably not causing an issue before 13.0 since the creation of
the journal entry from the POS was different.

[1] https://github.com/odoo/odoo/blob/b22935caa3df824bc56a0828da9bee921bca5a5b/addons/point_of_sale/models/pos_session.py#L381
[2] https://github.com/odoo/odoo/blob/b22935caa3df824bc56a0828da9bee921bca5a5b/addons/point_of_sale/models/pos_session.py#L557
[3] https://github.com/odoo/odoo/blob/b22935caa3df824bc56a0828da9bee921bca5a5b/addons/account/models/account.py#L1654
[4] https://github.com/odoo/odoo/blob/b22935caa3df824bc56a0828da9bee921bca5a5b/addons/account/models/account.py#L1740

opw-2181486

closes odoo/odoo#44834

X-original-commit: 0896afdc814937621fe6323bf16d461582207217
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-02-07 09:55:59 +00:00
wan e77015011c [FIX] account: find reference move for sequence domain
We only want journal entries with an actual sequence to be used as
reference, otherwise we can't deduce the reset periodicity of the
journal.

closes odoo/odoo#44833

X-original-commit: a57a0edae27a93aadf8fe8c95ae45ab91ec9aa31
Signed-off-by: wan <william-andre@users.noreply.github.com>
2020-02-07 09:34:20 +00:00
Nicolas Martinelli ea11aae8d6 [FIX] stock: show total routes label
On product categories, the `total_route_ids` field is shown without
label. This is confusing for end users since the same route seems to
appear twice.

opw-2173783

closes odoo/odoo#44821

X-original-commit: 91bc6464132d4525325cc7a376788b7226e1a723
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-02-07 07:43:11 +00:00
Jorge Pinna Puissant 0af58af300 [FIX] point_of_sale: long product name print receipt in safari
Before this commit, when printing in safari a receipt that contains
products with long names, parts of the name were overlapped. This occurs
because, in safari, the library that transforms the html into text
mismanages the spaces.
This is a well known problem, see : niklasvh/html2canvas#1654

Now, the name is printed correctly in safari, same behaviour than the
others browsers.

opw-2169656

closes odoo/odoo#44819

X-original-commit: 263131f49828d2d8f2177bae15d0af84af341c37
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
2020-02-07 07:28:09 +00:00
Simon Lejeune e2b42f3718 [FIX] stock_landed_costs: flaky tests
We chose the vendors by searching random res.partner but sometimes
partners of another company are returned, making the _check_company
mechanism raise an error.

closes odoo/odoo#44815

X-original-commit: 1cfcf21efa888720f9c34b337532251db6fd0089
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2020-02-06 20:50:58 +00:00
Simon Lejeune 93b2377656 [FIX] stock_landed_costs: reconciliation with vendor bill
in anglo saxon accounting
- receipt products through an rfq
- when creating the vendor bill of the rfq, directly add a landed costs
  product
- post the vendor bill then create the landed cost, validate the landed
  cost
- the aml of the LC is not reconciled with the aml of the vendor bill
  for the lc product because the "You are trying to reconcile some
  entries that are already reconciled." error.

We fix this by filtering out the already reconciled aml.
Not that the flow is behaving as expected if the landed cost is created
in another vendor bill, such as the tests were doing. We thus add
another test.

opw-2184988

X-original-commit: 1e78527ac5295563e9610ad9ddd98834998285f3
2020-02-06 20:50:57 +00:00
Nicolas Martinelli 25e382755d [FIX] stock: default location for scrap
- Create a default value for 'Source Location' or 'Scrap Location'
- Create a Scrap Order

the default value is not taken into account since it is overridden by
`_onchange_company_id`.

We avoid changing the location in case the company matches.

opw-2189578

closes odoo/odoo#44812

X-original-commit: 5c544adbcf0f0af67b29a39c191e190a59fed90c
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-02-06 19:33:19 +00:00
Nicolas Martinelli 95300401ab [FIX] account: 100% tax
- Create the following tax:
  Tax Computation: Percentage of Price Tax Included
  Amount: 100 %
  Included in price
- Create an invoice, add a product with this tax
- Save

A ZeroDivision error is raised.

opw-2186998

closes odoo/odoo#44810

X-original-commit: 0b11474a168037b5469176433256759916e8276b
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-02-06 19:25:09 +00:00
Andrea Grazioso (agr-odoo) 090748c3b1 [FIX] purchase: specific search alter order duplication
1) Go to purchasing, and in the search area type "8888"
2) Click on the little arrow next to "Search Product for: 8888"
3) Select "[FURN_8888] Office Lamp"
4) Choose Purchase Order PO00009 which has FURN_8888 on the second line:
5) Choose Action > Duplicate

The 1st line end up with the searched product, not the original product.
This happens because the search add the context key
'default_product_id'. By chance the product.product model has a
'product_id' field which may happen to be not filled.
This cause the model api to look for a default value in the context and the
first line of the order get overridden.

Removing the specific key from the env solve the issue

opw-2188429

closes odoo/odoo#44802

X-original-commit: ed6ac9c63b4e8a5815e2f46693ababbde4a82919
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-02-06 18:37:54 +00:00
Adrian Torres f61262eb08 [FIX] core: delay constraint application in case of upgrade
closes odoo/odoo#44800

Co-authored-with: Xavier Dollé <xdo@odoo.com>
X-original-commit: bc2bb5e03c2b32d4ee1b0597ea5889c17d2b0e0e
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2020-02-06 18:28:29 +00:00
Jérémy Hennecart f6a1437aeb [FIX] website_slides: fix ui for quiz creation and update on mobile
Before, the buttons to save, cancel or update quiz in eLearning frontend
as well as icons weren't displayed correctly.

Now, all elements are displayed correctly on mobile or on computer, more
responsive and better displayed.

Task 2153990
PR #42846

closes odoo/odoo#43328

X-original-commit: 4d986beb7192c34c133d8d5d02ff62bd159f202a
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-01-27 10:56:17 +00:00
Nicolas Martinelli fc1020c4fb [FIX] stock: validate inventory
Highlight the 'Validate Inventory' button only if there is at least one
inventory line.

opw-2187225

closes odoo/odoo#44793

X-original-commit: 95da1ac1a35ad748ba5adb755b89731595e78b2f
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-02-06 18:00:08 +00:00
Andrea Grazioso (agr-odoo) 96a3383c82 [FIX] base: fix Croatian address formatting
Have a company with Croatian address but no street2 set.
Create and invoice, print it. On the report the street2 will appear
blank (Empty line).

Correcting the formatting of the address fix the issue

opw-2182621

closes odoo/odoo#44789

X-original-commit: 5f4cc31a3b5a459f4a33c149fafb635a13f08270
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-02-06 17:43:53 +00:00
alt-odoo 0758a02ee4 [FIX] point_of_sale: prevent deletion of POS bank statement
Nothing prevents to delete a bank statement linked to an open pos session,
which leads to a KeyError when validating and posting entries at closure.

closes odoo/odoo#44787

X-original-commit: 7416340e0ff96bdabb0578f9c1eccd79baf83e17
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-02-06 17:41:12 +00:00
Goffin Simon 43af0c73b6 [FIX] account: Default account and partner when creating aml
Steps to reproduce the bug:

- Create a journal entry
- Create a line L1 with an account A and a partner P
- Create a second line L2 with an account A and a partner P
- Create a third line by clicking on 'Add line'

Bug:

The account A and partner P was not suggested as in saas-12.3

opw:2188921,2152827

closes odoo/odoo#44784

X-original-commit: 31890c4e676f7f4f65221ca66bfd66cc0ceedecc
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-02-06 17:30:26 +00:00
Pierre Masereel d8cde5969f [FIX] pos_restaurant: improve performance retrieving table orders
Since synchronization of tables was added in POS restaurant,
requests are frequently made to the server to display the
number of open orders on each table.

The implementation of the counting caused O(num_tables) queries,
and those queries were slow on large databases because there
was no index for the `table_id` column.

This patch fixes both problems, and the counting now uses
3 fast queries regardless of the number of tables.

On a sample database with 2k tables and 50k POS orders,
calls to `get_tables_order_count` went down
from 1 s and 100+ SQL queries to 10 ms and 4 queries.

About 2 orders of magnitude faster, with server load drastically
reduced as well.

closes odoo/odoo#44782

X-original-commit: 6c21ea369dc247b3ab31b767315c48ffc8d40a3d
Signed-off-by: Olivier Dony (odo) <odo@openerp.com>
2020-02-06 17:26:45 +00:00
Goffin Simon a4d46ec55c [FIX] account, sale: Default payment term when creating an invoice
Steps to reproduce the bug:

- Let's consider a partner P without property_payment_term_id
- Create a SO for P, confirm it and create an invoice I
- In debug mode, on the SO click on the smart button 'invoice'
- On I, click on the 'Set Default' in the debug menu
- Set a payment term PT as default value (ir.default) for all users
- From this view, create a new invoice

Bug:

The default payment term PT was not set on the new invoice

opw:2184367

closes odoo/odoo#44781

X-original-commit: c258b8a0427bd5aface891ed1f4420174f4afde4
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-02-06 17:25:20 +00:00
jerome hanke (jhk) d657a9c29a [FIX] product: removal of hardcoded value in product template
Steps to reproduce:
- install sales
- activate units of measures and variants
- set imperial units under general settings (pounds for weight and ft³ for volume)
- create at least 2 variants on a product and access them via the smart button
from product.template

Previous behavior:
the volume remains in m³, it is hardcoded in the template

Current behavior:
the volume is printed just like the weight (generic uom notation)

opw-2186965

closes odoo/odoo#44777

X-original-commit: d7f2beac5ff856afeb684be4b13317838a0257a1
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-02-06 17:19:55 +00:00
Simon Lejeune de26f4a4e8 [FIX] stock_account: anglo saxon and corrections
Don't ignore correction layers when computing the anglo saxon price
unit. We use the `stock_valuation_layer_id` field on the layer to point
the correction layer to the corrected layer. When computing the average
price of the delivered things, ignore correction entry but take them
into account when choosing a corrected entry.

opw-2179900

closes odoo/odoo#44774

X-original-commit: 3831649b81c1271977730cdf46100f814687af61
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2020-02-06 17:15:18 +00:00
Josse Colpaert 5e2c71b6e7 [FIX] l10n_nl: avoid using abs in tax report
Before, we had abs() in the report, but we saw it was wrong:
https://github.com/odoo/enterprise/commit/5e7d91d5ea5356fa3c38b6676b68403a713da5be#commitcomment-33050133

Somehow they remained in saas-12.3 and with this we remove them as well.

Thanks to Martijn Kluijtmans
opw-2186942

closes odoo/odoo#44768

X-original-commit: 4a1efb07646a1920201e7e4d2d13241977c1d2a7
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2020-02-06 17:05:30 +00:00
helly kapatelandjpr-odoo 7f0ebad5cc [FIX] mail: fix issue when posting a message on a document whose first message / parent is not readable
How to reproduce
================

Have a portal user commenting a task on the customer portal. He may experience
a crash if previous message / first message is not available, for example
if it is internal or not published.

This is due to reference computation used in outgoing emails as it is based
on parent messageID. Accessing it crashes although it should not as it is
used only for technical purpose.

Fix
===

In this comme we fix that issue by browsing the reference message as sudo
to access its messageID. A test is added to avoid regressions.

Task ID 2061760
PR #36845

closes odoo/odoo#44765

X-original-commit: e94349ed65e05a40af6e690e366de81fc5aa6725
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Co-authored-by: jpr-odoo <jpr@openerp.com>
2020-02-06 16:57:41 +00:00
fw-bot 7954594d12 [FW][REF] account: new method _prepare_default_reversal
to be able to inherit these methods to make it easier to
add fields in the refund wizard e.g.

closes odoo/odoo#44629

X-original-commit: e814374a20de096fd795aec34ab0e3de4977fc85
Signed-off-by: Josse Colpaert <jco@openerp.com>
2020-02-06 10:02:56 +00:00
Michael Mattiello (mcm) c5e34d77f5 [IMP] web: show % symbol outside the input in percentage widget
Before this commit the % symbol was part of the input. We could write a
value with the % symbol to divide the value by 100 (50% = 0.5, 50 = 50)

This commit removes the % symbol from the input and adds it in a span
after the input so we do not need to write the % symbol anymore.

The value from the input will be saved as $value / 100 in database.

task-2065078

closes odoo/odoo#43995

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-02-06 11:55:13 +00:00
nje-odoo 9d85bce7db [IMP] purchase_report: improve test case in report
if product have taxes and taxes_id field is empty
then it will fill the 'taxes_id', so price_total field
have taxed Total.

Task- 2093205
closes- #41681

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2020-02-06 10:18:34 +00:00
nje-odoo b883041377 [FIX] purchase: trigger onchange when po is import.
purpose of this commit is when we import po with po lines
system expects from user to import all those requried fields manually.

Using sale's hack 'prepare_add_missing_fields' fix this issue.

Now we can import po lines in purchase too.

Task- 2093205
closes- #41681
2020-02-06 10:18:34 +00:00
Lucas Perais (lpe) c98579d25a [IMP] web: many2many list editable as m2m_tags
Before this commit, there was a discrepancy between
many2many_tags widget and regular many2many list

That is, in tag mode, when someone had read access alone on the comodel
he could modify the members of the m2m relation on the current model
Which couldn't be done in m2m list

After this commit, it is possible in a m2m list to add
records to a relation, even if we don't have CRUD access on the comodel

Task 44074

closes odoo/odoo#40194

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-02-06 10:19:00 +00:00
wan b2feb8b7f4 [FIX] account: change CoA even if one already installed
Because the tax closing entry is created (empty) at the creation of the
CoA, it is not possible anymore to change it later, even if the user
didn't create any journal entry.
By checking that there are no account.move.line instead of account.move,
and also there are no entries with a name different from '/' (to ensure
that the sequences are untouched) we can change the CoA if needed.

closes odoo/odoo#44659

X-original-commit: 8928dfe70867da3e40fa47f50bffa5dfd1976090
Signed-off-by: wan <william-andre@users.noreply.github.com>
2020-02-05 14:10:11 +00:00
Jeremy Kersten 76e31253e6 [FIX] website, website_customer: more precise xpath
Since commit 92737f2 (finetuning of 7b49f58) field website_id, website_tag_ids
are missing from form view of res partner.

Now we use a more precise xpath, hardcoding the group name into the xpath to
be sure that fields are correctly added below the company_id field from a
visible tab.

closes odoo/odoo#44644

X-original-commit: f830bf49013201aadd3feb113596d1534f800fd8
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2020-02-05 11:12:01 +00:00
wan 2370c875ce [IMP] account: create next activity on post
Task 2093179

Today, there is nothing that reminds a salesperson that an invoice
becomes overdue.

I propose that activities get created automatically on an invoice based
on the ‘due date’ of the journal items as soon as an invoice gets
validated.

This would greatly help the collection effort and be proactive rather
than reactive.

closes odoo/odoo#44129

Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2020-02-06 08:28:44 +00:00
fw-bot 115f36461c [REV] l10n_cn_small_business: Modify Small And Medium-sized Enterprises COA"
Forward port of https://github.com/odoo/odoo/pull/43768
Task 2157489
This reverts commit d3ca227.
That commit had wrong account types.

closes odoo/odoo#44508

Signed-off-by: Josse Colpaert <jco@openerp.com>
2020-02-06 09:29:32 +00:00
Arnaud Joset aaf5504373 [FIX] sale: prevent trackback when makeing an SO line without product
Before this fix, an empty sale order produced a traceback when the invoice was created.

closes odoo/odoo#42750

Taskid: 1997415
Related: odoo/enterprise#7540
Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
2020-02-06 07:21:44 +00:00
Odoo's Mergebot 31b1f411f6 [MERGE] website, web_editor, *: move theme customization to edit mode
*: theme_bootswatch

Previously, theme customization was done through a modal dialog in the
website module, this was not very user friendly since the rest of the
customization for the website design was done from edit mode, meaning
the user had to exit edit mode to customize things such as theme colors
or fonts. It was also rather confusing to have these seemingly related
things in completely unrelated places.

This commit moves all of the options that used to be in the theme
customization modal into a new tab in the editor's left panel.
Instead of having an entirely dedicated system for theme options,
those theme options are now simple snippet options.
See the customizeWebsite generic method.

This allows to make any option available in the third tab or on any
meaningful element like the header or the footer. This also allows to
take advantage of all the features of the left panel: dependencies,
visibility update, etc.

Note: same as before, those changes do apply the color/size/layout
immediately on the website, even if not saved. Changing that behavior
is complex and might be the job of another task.

See sub-commits for details

task-2088298

closes odoo/odoo#41166

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-02-06 01:29:07 +01:00
qsm-odoo 6fb4ed44a0 [IMP] website, *: make theme custo options act as simple snippet options
* web_editor, theme_bootswatch

Instead of having an entirely dedicated system for theme options in a
third tab of the left panel, those theme options are now simple snippet
options. See the customizeWebsite generic method.

This allows to make any option available in the third tab or on any
meaningful element like the header or the footer. This also allows to
take advantage of all the features of the left panel: dependencies,
visibility update, etc.

Note: same as before, those changes do apply the color/size/layout
immediately on the website, even if not saved. Changing that behavior
is complex and might be the job of another task.

Part of https://github.com/odoo/odoo/pull/41166
task-2088298
2020-02-05 23:49:53 +00:00
Samuel Degueldre 3bb666c226 [REF] website, web_editor: move theme customization to edit mode
Previously, theme customization was done through a modal dialog in the
website module, this was not very user friendly since the rest of the
customization for the website design was done from edit mode, meaning
the user had to exit edit mode to customize things such as theme colors
or fonts. It was also rather confusing to have these seemingly related
things in completely unrelated places.

This commit moves all of the options that used to be in the theme
customization modal into a new tab in the editor's left panel.

This commit is mainly just about rendering the old modal as a third left
panel content. See next commit for deeper changes.

Note: same as before, those changes do apply the color/size/layout
immediately on the website, even if not saved. Changing that behavior
is complex and might be the job of another task.

Part of https://github.com/odoo/odoo/pull/41166
task-2088298
2020-02-05 23:49:53 +00:00
qsm-odoo b3e9bfbac0 [REF] website: reorganize snippets.options.js file
Part of https://github.com/odoo/odoo/pull/41166
2020-02-05 23:49:53 +00:00
qsm-odoo 1e576ee899 [FIX] web_editor: consider negative values in the left panel
A negative value, even if legit, was not understood by the editor and
induced empty inputs in the left panel.

closes odoo/odoo#44683

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-02-05 21:39:22 +00:00
Victor Feyens ecc068762e [FIX] product: pricelist advanced rules UI
closes odoo/odoo#44675

Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2020-02-05 18:07:12 +00:00
mreficent 5c7343c5ce [FIX] purchase_product_matrix: SO->PO typos
closes odoo/odoo#44666

Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2020-02-05 16:19:47 +00:00
Odoo's Mergebot d04d02be16 [MERGE] timer: Introduce a new mixin to record time
1/ timer: New mixin to record time on models

    Purpose

    The timer mechanism is already existing on timesheet.

    We would like to introduce it on helpdesk.ticket too, and
    probably on other models afterward.

    On the other hand, only one timer can be launched on a single
    timesheet currently, shared amongst the different users.

    This commit introduced a new mixin on which
    - Each user can launch a timer on each record of the models
      inheriting the mixin.
    - Launching a new timer on a record pauses the timer of the
      user that could be already running.
    - The mixin brings methods to start/stop/pause/resume the
      timer, that could be overridden to implement a specific
      behavior for the related model, for example create a
      timesheet entry.

2/ test_timer: Add test module for the timer mixin

    Purpose
    As testing the mixin requires to create a new model,
    we prefered to create another module.

3/ hr_timesheet: Adapt timer with new timer mixin

    Purpose
    Now that we have a new timer mixin that offers more possibilities
    than what was currently implemented, we can reuse it in the timesheet
    management module.

4/ timesheet_grid: Adapt timer buttons to new mixin

    Purpose
    The timesheets now uses an improved version of the timer,
    using a new mixin.
    Adapt the code accordingly.

5/ helpdesk_timesheet: Use timer mixin on helpdesk tickets

    Purpose
    Now that we have a new timer mixin that offers more possibilities
    than what was currently implemented, we can reuse it in the helpdesk
    management module.

closes odoo/odoo#43778

Taskid: 2149450
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-02-05 18:40:06 +01:00
fja-odoo 617eba9417 [IMP] website_form, *: entirely review s_website_form snippet
*: web_editor, website_crm, website_form_project,
website_hr_recruitment, website_sale

The form builder is now using the left panel option system. Many new
options are introduced to build better forms more quickly.

The tests are now running with the new website_form implementation.

Part of: https://github.com/odoo/odoo/pull/42189
task-2092425

closes odoo/odoo#42189

Related: odoo/enterprise#7365
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-02-05 16:13:25 +00:00
fja-odoo f434e02f3d [FIX] website_form: replace old and unused code
This widget was still calling deprecated methods.

task-2092425
2020-02-05 16:13:13 +00:00