Commit Graph
144919 Commits
Author SHA1 Message Date
Robin Heinz 809f0bbe1b [IMP] Gift Card: Allow usage of gift card in POS
Split initial module gift card into 2 modules:
    - gift card
    - sales gift card

This change is made to isolate the sale order from the gift card module.

In order to create the gift card in the point of sale, we added 3 options
in the pos config.
Create and set: generate and set the amount of a new gift card.
Use and set: We use an already existing card and set the amount of this one.
Use: We use a gift card that already has a certain amount.

When you pay with a gift cards, reports are generated. Those reports
give you the code and the barcode of  the gift cards.
You also get information such as expiration date and the amount.

closes odoo/odoo#75518

Task-id: 1737
Related: odoo/upgrade#2799
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2021-09-03 10:37:54 +00:00
Rémy Voet (ryv) ff4d25a427 [IMP] mrp_subcontracting: allow flexible consumption
Take in account the bom consumption of subcontracting BoM:
- In flexible and warning we can now record extra component
(even if there isn't tracked component).
- In the warning case, we get a warning issue in during the recording
of component if we consume more than expected
- In case of script consumption, we cannot record component expected
if some are tracked. In this case we can consume more than expected
only if the user is a mrp manager.

Also fix "Set quantities" Button for the subcontracting

task-2486811

closes odoo/odoo#75041

Related: odoo/enterprise#20350
Related: odoo/upgrade#2750
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2021-09-03 10:37:48 +00:00
Rémy Voet (ryv) 36e3c443d2 [FIX] stock,mrp_subcontracting: fix "Set Quantity"
The button "Set Quantity" have a different behavior
(it doesn't take in account tracked product) than
the immediate process which is confusing.
Now both flow share the same code and allow to avoid
the "Set Quantity" for the subcontracting with tracked component.

task-2486811

Part-of: odoo/odoo#75041
2021-09-03 10:37:48 +00:00
Rémy Voet (ryv) 6663c05abf [FIX] stock: fix wrong scheduler log.
The logs of the scheduler wasn't correct ( 4467734b77 ):
- The number of object process wasn't correct for the last batch
- Fix Spelling  of "commited"

Also, we commit every 1000 moves assignation instead of 100.
(Because the prefetch already prefetch by 1000 and to benefit
futher the batch optimisation of _action_assign).

Part-of: odoo/odoo#75041
2021-09-03 10:37:48 +00:00
Rémy Voet (ryv) 2127ded2b1 [FIX] mrp_subcontracting: avoid byproduct
We cannot have byproduct in case of subcontracting,
raise a Error if we try (like operation). Also remove the
it from the subcontracted form (also clean empty space of it).

task-2486811

Part-of: odoo/odoo#75041
2021-09-03 10:37:47 +00:00
Rémy Voet (ryv) 7f068ef8ca [IMP] stock_dropshipping: add dropship smartbutton
Divide "Delivery"/"Incoming Shipment" smart button of "Sale"/"Purchase"
order form between normal "Delivery"/"Incoming Shipment" and a
"dropship" picking.
Also clean a little bit technically

task-2486811

Part-of: odoo/odoo#75041
2021-09-03 10:37:47 +00:00
Rémy Voet (ryv) 22276db82b [IMP] mrp_subcontracting: improve views of record component
Add decoration in the qty_done fields to ease the usage of
the record component wizard.

task-2486811

Part-of: odoo/odoo#75041
2021-09-03 10:37:47 +00:00
Rémy Voet (ryv) 6aa8b7dd67 [IMP] mrp_subcontracting: improve mrp bom report
- The "BoM Structure & Cost" takes now in account
the subcontracting cost.
The subcontracting cost depends of the best supplier info in product
and subcontractor register in the BoM.
- Also add this subcontracting cost (to the cost field) when we click on
"Compute Price from BoM" in the product view.

task-2486811

Part-of: odoo/odoo#75041
2021-09-03 10:37:46 +00:00
Rémy Voet (ryv) 10c6f4e837 [REF] mrp: simplify the bom strucure report
Add `_get_extra_column_count` to extend and clean
extention for mrp_plm and mrp_subcontracting.

See enterprise commit.

task-2486811

Part-of: odoo/odoo#75041
2021-09-03 10:37:46 +00:00
Rémy Voet (ryv) 7d9a9574ce [IMP] mrp_subcontracting: add a operation type for resupply
Add a operation type (`stock.picking.type`) for
the subcontracting resupply in order to distinct
easily the a simple delivery and a resupply to a subcontractor.

task-2486811

Part-of: odoo/odoo#75041
2021-09-03 10:37:46 +00:00
Rémy Voet (ryv) 820fbd9973 [ADD] mrp_subcontracting_purchase: new module
Add a new module to add smart buttons between a subcontracting purchase
order and the ressuply component delivery.

task-2486811

Part-of: odoo/odoo#75041
2021-09-03 10:37:45 +00:00
Rémy Voet (ryv) 3b9511285a [FIX] purchase_stock: avoid unaccess Error
The receipt count smart button is on the PO form even if the user is
not able to see the delivery.

Add `stock.group_stock_user` on the button
(Also remove the useless picking_ids fieds of the form).

task-2486811

Part-of: odoo/odoo#75041
2021-09-03 10:37:45 +00:00
Thibault Delavallée 2915a939a8 [IMP] test_mail_full: add some tests, notably for SMS deletion
closes odoo/odoo#75895

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-09-03 09:26:12 +00:00
Thibault Delavallée d98906c411 [REF] test_mail_full: remove unnecessary mock of link tracker
Another one already exists. Let us clean some code.

Part-of: odoo/odoo#75895
2021-09-03 09:26:11 +00:00
Thibault Delavallée bd1eeababa [FIX] auth_totp: fix file name for mail template
Zairisse too much esse.

Part-of: odoo/odoo#75895
2021-09-03 09:26:11 +00:00
Ravi Thakkar 2e8fa03095 [IMP] event_*: re-arrange stat buttons on the event form view
This commit improves the view inheritance priority and xpaths for
the inherited form views of event to arrange the stat buttons in
logical manner, regardless of installation order of the modules.
The stat button order should always be:

- Attendees
- Leads
- Sales
- Tracks
- Sponsors
- Rooms

Task-2585998
EnterprisePR-https://github.com/odoo/enterprise/pull/20082

closes odoo/odoo#74203

Related: odoo/enterprise#20082
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-09-03 09:26:01 +00:00
Tom De Caluw 046189fb53 [IMP] website_sale: allow hide attributes in filter
task-2466988

closes odoo/odoo#75898

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-09-03 08:12:14 +00:00
Sébastien Geelen (sge) 28efd996b6 [IMP] web_editor: add support for field html placeholder
The editor now support the field html placeholder value when given.

task-2586137

closes odoo/odoo#75863

Related: odoo/enterprise#20571
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2021-09-03 08:11:57 +00:00
Sébastien Geelen (sge) 464b454953 [FIX] web,account: fix css for report comments
Since we change the editor for the comments on invoices,
The layout was a bit broken with some unwanted spacings.

task-2586137

Part-of: odoo/odoo#75863
2021-09-03 08:11:57 +00:00
Sébastien Geelen (sge) 607c5ea4e2 [FIX] web_editor: make editor smaller in contacts
Make the default height of the editor quite smaller in res.partner view.
To avoid "breaking" the design and prevent scrollbars

task-2586137

Part-of: odoo/odoo#75863
2021-09-03 08:11:56 +00:00
Romain Derie 8727ed2766 [IMP] web, web_editor: restore CTRL+K as edit link shortcut
In editor, CTRL+K was changed to CTRL+M to edit link.
This was done to free CTRL+K for the command palette in the backend.

The issue is that CTRL+K is an universal keybind to edit links, and we should
not remove it, especially to add another behavior on it that could very well
fit on another key.

Validated by FP/AL at
https://discord.com/channels/678381219515465750/687338152372994236/880465980986368050

closes odoo/odoo#75848

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-09-03 08:11:49 +00:00
yhu-odoo caa908506b [IMP] mrp,stock: count kits product
When a product's has a kits bom, we consider it a kits product.
When a product is a kits product, we count its "on hand" and "forecast"
qty by caculating how many can be produced according to the bom.
We add status button to the show the qty on kit product form.

Task-2444000
COM PR odoo/odoo#75555
ENT PR odoo/enterprise#20440
UPG PR odoo/upgrade#2783

Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2021-09-03 08:11:42 +00:00
yhu-odoo fa2231fb0c [ADD] mrp_repair: explode kits in repair
When repair contains kits product(product has kits boms), decompose
it into components.

Task-2444000
COM PR odoo/odoo#75555
ENT PR odoo/enterprise#20440
UPG PR odoo/upgrade#2783
2021-09-03 08:11:42 +00:00
yhu-odoo 5855df867f [IMP] mrp: add kits decription in picking
When recieving a kits product, it will be decomponent in the picking. In
this commit, we add a column in the picking to show the info of the kits
in picking.

Task-2444000
COM PR odoo/odoo#75555
ENT PR odoo/enterprise#20440
UPG PR odoo/upgrade#2783
2021-09-03 08:11:42 +00:00
Odoo's Mergebot 11164423e1 [IMP] website, *: make search bar generic
Before this commit the search bar was specific to products. This generalises the search bar so it can be added to any model.

A snippet is provided, and used to replace the old search bars of blog, courses, event, forum, page and shop. The search results of these pages and the autocomplete of the search bar run through the same search mechanism.

A new hybrid results page has also been created as a target of a search on "Everything".

In each involved module, `website._get_search_details()` is implemented to return search metadata for every model related to the `search_type` parameter. Search metadata for a single model is returned by `_get_search_detail()` on that specific model.

The autocomplete runs through the additional `website._render_search_results()` pre-rendering step that prepares the data to fit in the autocomplete template.

This PR also introduces a fuzzy search mechanism: if the searched term is not found then the search is performed on a resembling term. The similarity is obtained from a Levenshtein distance combined with ratios of common and different letters.

By default the dictionary against which the search term is matched is based on the content of the search fields containing a word that starts with the first letter of the search term.

If the `pg_trgm` Postgresql extension is installed the dictionary is built from matches obtained using the `word_similarity` function.

task-2379555
odoo/upgrade#2186

closes odoo/odoo#65871

Signed-off-by: Benoit Socias (bso) <bso-odoo@users.noreply.github.com>
2021-09-03 08:59:35 +02:00
Benoit Socias b88bb72beb [IMP] website: search inside translated pages
Before this commit the search on pages was only done in the main
language.

After this commit the search on pages is based on the translated "arch"
field.

task-2379555
https://github.com/odoo/odoo/pull/65871

Part-of: odoo/odoo#65871
2021-09-03 06:59:33 +00:00
Benoit Socias 9f9c4bb7e4 [IMP] website(_*): replace search callbacks by a mixin
Before this commit the `_search_get_detail` result contained callback
functions to handle special behavior during fetching and rendering.

After this commit a `website.searchable.mixin` is introduced that must
be inherited by models that participate in website-based searches.
Custom behavior previously achieved with callbacks is now achieved by
overloading methods of this mixin.

task-2379555
https://github.com/odoo/odoo/pull/65871

Part-of: odoo/odoo#65871
2021-09-03 06:59:33 +00:00
Benoit Socias c6ba756e4b [IMP] core, website: use fuzzy matching in web-based search
Before this commit searched terms were the ones entered by the end-user.

After this commit if the searched term is not found then the search is
performed on a resembling term.
The similarity is obtained from a Levenshtein distance combined with
ratios of common and different letters.
By default the dictionary against which the search term is matched is
based on the content of the search fields containing a word that starts
with the first letter of the search term.
If the `pg_trgm` Postgresql extension is installed the dictionary is
built from matches using the `<%%` operator (similar to the
`word_similarity` function).
Several approaches were benchmarked during development, those results
are available through the task record.

task-2379555
https://github.com/odoo/odoo/pull/65871

Part-of: odoo/odoo#65871
2021-09-03 06:59:33 +00:00
Benoit Socias 7559626c54 [IMP] website, *: make a generic search bar snippet available
(*: website_blog, website_event, website_forum, website_sale,
website_slides)

Before this commit the search bar was specific to products.

After this commit a generic search bar is available as a general feature
of website which can be configured to inspect specific models.
The snippet is used to replace the old search bar in blog, courses,
event, forum, page and shop.
The search results of these pages and the autocomplete of the search bar
run through the same search mechanism.
A new hybrid results page has also been created as a target of a search
on "Everything".

In each involved module, `website._search_get_details()` is implemented
to return search metadata for every model related to the `search_type`
parameter.
Search metadata for a single model is returned by `_search_get_detail()`
on that specific model.

The autocomplete runs through the additional
`website._search_render_results()` pre-rendering step that prepares the
data to fit in the autocomplete template.

task-2379555
https://github.com/odoo/odoo/pull/65871

Part-of: odoo/odoo#65871
2021-09-03 06:59:33 +00:00
Sébastien Theys 3ef53c8e5a [IMP] mail: make guest cookie smaller and add expiration date
Part of task-2494829

closes odoo/odoo#75888

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-09-03 02:03:58 +00:00
Lucas Lefèvre a63585dc91 [FIX] web: Correct notification service name in mocks
The service is called `notifications` when mocked in tests,
instead of `notification`

closes odoo/odoo#75859

Related: odoo/enterprise#20554
Signed-off-by: Vincent Schippefilt (vsc) <vsc@odoo.com>
2021-09-03 02:03:54 +00:00
Pierre RousseauandLucasLefevre 1dcf1acd3b [REF] web: Allow to get ir.filter values without creating the record
In the spreadsheet app, we need the exact same values which are saved
for "ir.filter" records.

This commit refactor a bit things to allows getting those values without
actually creating the "ir.filter" record.

Task 2572184

Part-of: odoo/odoo#75859
Co-authored-by: LucasLefevre <lul@odoo.com>
2021-09-03 02:03:53 +00:00
oco-odoo 5419fe445d [IMP] account: allow instantiating taxes from foreign charts of accounts
In multivat setup, we need to create taxes in foreign countries to map them with domestic taxes. Before this commit, this was only possible manually, even though all the necessary information lies in Odoo's account.tax.template objects created by l10n modules.

We now display a banner on top of foreign vat fiscal positions with a button allowing instantiating those templates directly from them when it's appropriate.

closes odoo/odoo#75803

Task: 2453325
Related: odoo/enterprise#20553
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2021-09-03 02:03:43 +00:00
Samuel Degueldre 776d1ee08b [IMP] mail: allow user to delete their messages
This commit allows users to "delete" their messages in discuss, as well
as their notes on other records. Admins can delete anyone discuss
messages or notes. Tracking messages such as a change in stage or other
cannot be deleted.

This "delete" is a "soft-delete" in that it only empties the message's
content, so that it is no longer displayed in the UI, but remains in the
database so that people who got notified by email can still reply to the
message, among other things.

task-2365646

closes odoo/odoo#74857

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-09-03 02:03:25 +00:00
Benoit Socias e67a123227 [IMP] website_payment: take amount change into account
Before this commit amount updates were not taken into account during the
payment operation.

After this commit amount updates are taken into account for the actual
payment operation and payment fees are updated according to the amount
and the partner country.

Part of #63133

task-2398403

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-09-03 02:03:15 +00:00
Benoit Socias 7fccbac004 [IMP] payment, website_payment: perform the donation payment
This commit adds /donation/* routes to perform the donation:
- /pay: shows the form with the contact details and donation details
- /transaction: creates the partner_id if missing and executes the
transaction
- /confirm: displays the payment success page

PR-63133

task-2398403

Part-of: odoo/odoo#63133
2021-09-03 02:03:15 +00:00
Benjamin Vray 5ffce116a6 [IMP] website_payment, *: new snippet make a donation
*=  website, website_sale, web_editor

This commit add a new snippet donation for the website builder.

PR-63133

task-2398403

Part-of: odoo/odoo#63133
2021-09-03 02:03:14 +00:00
Benjamin Vray ec005bae0e [IMP] website, tools: allow to translate hidden inputs
As the descriptions of the donation snippet will be in hidden inputs,
we added the possibility to translate these inputs in translate mode.

PR-63133

task-2398403

Part-of: odoo/odoo#63133
2021-09-03 02:03:14 +00:00
Younn Olivier 65fb31454f [FIX] web_editor: skip rollback when cloning a snippet
There were two issues when cloning a website_form field:

1/ Cloning is not done
Steps to reproduce :
Drop a form from the editor, save
Click on edit, select the field
Click on the clone option without hovering the label position option

2/ A traceback is thrown
Drop a form from the editor, save
Click on edit, select the field
Click on the clone option after hovering the label position option

Some FieldEditor options modify directly the dom and replace the field
node, which the editor will detect as a change of unbreakables. As a
result a rollback will be required in the next call to
odooEitor.historyStep(), done in SnippetEditor.clone().

To solve that we skip potential rollbacks while recording a history step
during a clone.

task-2485093

closes odoo/odoo#75908

X-original-commit: 7a75f295087cb02f162477a9df3b138b6780dbdd
Signed-off-by: Romain Derie <rdeodoo@users.noreply.github.com>
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-09-03 00:49:13 +00:00
Guillaume (gdi) 151d570933 [FIX] website_form: prevent input ids from being duplicated
When cloning a website_form field, we rerender the cloned field to
reassign its elements ids and for attributes with a unique ID instead of
the old ones.

Rerendering the list also removes an issue with Selection fields that
were not visible after a clone and a save, as it was usually done after
a _rerenderXML, not executed after a clone.

Also, _renderField docstring was wrong, and its return values
terminology have been replaced with correct one.

task-2485093

X-original-commit: 92bacc8907fa9577805b28a11894e7a006b2a5bf
Part-of: odoo/odoo#75908
2021-09-03 00:49:13 +00:00
Sébastien Geelen (sge) fc67a3370a [FIX] website: ensure cover changes are saved
Changes on cover attributes (bg-color, size) were not saved properly
when no other option where changed on the object.

task-2547729

closes odoo/odoo#75890

X-original-commit: 6d00c5ac0346beb57eef2192fe21a45a1158d87e
Signed-off-by: Antoine Guenet <Zinston@users.noreply.github.com>
2021-09-02 15:36:54 +00:00
qdp-odoo 2dcbe92d78 [IMP] sale_stock, sale_timesheet, purchase_stock: accrual wizard now propose an amount taking care of the accrual date
This allows to solve the following use case:
* we are in March
* a SO created during January shows currently a delivered quantity (timesheet on service or delivered goods on storable products): timesheets/pickings were done in February
* creating the accrued entry for January 31 should display accordingly an amount of 0 by default since everything was done in February
Invoices invoice_dates are also taken into account:
* day 0 : delivered 10
* day 2 : 5 invoiced
* accrued entries for 10 if accrual date = day 1, accrued entries for 5 if accrual date = day 3,

followup of task 2255642

closes odoo/odoo#75886

Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2021-09-02 15:36:50 +00:00
svs-odoo aa4caa8d75 [FIX] barcodes_gs1_nomenclature: tweaks data rules
Two changes:
 - The `barcode_rule_gs1_16` was renamed `barcode_rule_gs1_17` (and its
   AI was changed too) as the AI 16 is about the sale by date, not the
   expiration date;

 - The `qty_done` rule type was changed for `quantity` as `qty_done`
   refers to the move field, but the rule isn't only about this field as
   it could be used by other model like `stock.quant`.

closes odoo/odoo#75699

Related: odoo/enterprise#20482
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2021-09-02 15:36:35 +00:00
svs-odoo b101217539 [FIX] stock: uniq package type barcode
Before this commit, multiple package types can have the same barcode.
As it makes no sense and could lead to confusion, it's no more possible.

task-2627002

Part-of: odoo/odoo#75699
2021-09-02 15:36:35 +00:00
svs-odoo 5169baf7c9 [IMP] stock,barcodes_gs1_nomenclature: demo data
For `stock`, adds package type demo data (pallet and box).

For `barcodes_gs1_nomenclature`, adds a custom rule (AI 91) to recognize
the package type in the Barcode Application.
As there is no standard GS1 nomenclature's rule for the package as
defined by Odoo and there is a bunch of free-to-use AI (from 91 to 99),
using one of them for the package type could be useful to be able to
scan a new package and create it on the fly with the wanted type.

task-2627002

Part-of: odoo/odoo#75699
2021-09-02 15:36:35 +00:00
qmo-odooandAurélien Warnon d3fdbe2973 [IMP] calendar,crm: improve mail.activities meetings management
Before this commit, editing a mail.activity with the "meeting" category would
open a modal form for the mail.activity, which did not make much sense.

When editing a mail.activity that is linked to a calendar.event, you will now
jump on the calendar view to edit the related event, which is much more
convenient.

In addition, when scheduling such an activity, the "Edit" button in the chatter
is renamed to "Reschedule", to show the user that he will land on the calendar
view.

Furthermore, trying to delete an activity that is linked to a meeting will now
prompt a confirmation dialog warning the user that the meeting will be deleted
as well.

Finally, we moved the 'phonecall' activity category from the 'voip' module
(enterprise) to the base 'mail' module.
Scheduling a phonecall activity will let the user choose if he wants to:
- Simply save the activity, which will schedule a regular mail.activity
- Open the calendar to create a related calendar.event
  Used typically when you want your colleagues to see that you are busy in your
  calendar during this call.

Task-2486126
ENT PR odoo/enterprise#20431
UPG PR odoo/upgrade#2775

closes odoo/odoo#75530

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Co-authored-by: Aurélien Warnon <awa@odoo.com>
2021-09-02 15:36:28 +00:00
Odoo's Mergebot f7127d3963 [MERGE] services: Improve UX
This PR brings UX improvements in the Services Apps (Planning, Timesheets, Project, Helpdesk, Field Service)

task-2615316
Related: odoo/enterprise#20426
Related: odoo/upgrade#2773

--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr

closes odoo/odoo#75524

Signed-off-by: LTU-Odoo <IT-Ideas@users.noreply.github.com>
2021-09-02 17:36:13 +02:00
wan beb6f75d57 [IMP] account: resequence only in debug mode
* Move the action to "technical feature" debug mode group instead of
group "advisor"
* Set the action in noupdate="1" to facilitate customization of right

task-2604155

closes odoo/odoo#75819

Related: odoo/upgrade#2794
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2021-09-02 14:15:25 +00:00
wan 8e120ba28a [IMP] base: filter ir.actions depending on debug mode
Actions were not taking care of filtering out debug actions.

part of task-2604155

Part-of: odoo/odoo#75819
2021-09-02 14:15:25 +00:00
Joren Van Onder c6dfbbad4c [IMP] payment_authorize: support ACH payments
Before 660dc0ebaf it was possible to use Authorize to pay via your bank
account using the "Redirection to payment acquirer" option. Since the
refactor removed the redirect it was no longer possible. This commit
reintroduces that feature.

It does so by adding new form elements that accept bank account
information. Additionally it reintroduces the `billTo` and `customer`
parameters that Authorize requires when processing ACH payments.

task-2628318

closes odoo/odoo#75289

Signed-off-by: Antoine Vandevenne (anv) <AntoineVDV@users.noreply.github.com>
2021-09-02 14:15:17 +00:00