Commit Graph
136498 Commits
Author SHA1 Message Date
Simon Lejeune b435508fcf [FIX] stock: _action_confirm on confirmed move
task-2241471
2020-06-15 16:59:41 +02:00
Simon Lejeune bffd343d5a [REF] mrp: check availability not primary
This action isn't a mandatory step.

task-2241471
2020-06-15 16:59:41 +02:00
Rémy Voet (ryv) 31d19a8f52 [IMP] mrp_account: prevent grouping slv from MO
Prevent the group by product in the stock valuation layer when
we coming from a MO form via the button "Stock Valution".

task-2241471
2020-06-15 16:59:41 +02:00
Rémy Voet (ryv) 7e71c0f87f [IMP] mrp: add a operation menu
Add menu to a operation tree.

task-2241471
2020-06-15 16:59:41 +02:00
Rémy Voet (ryv) 328efb085a [REF] mrp: plan fields refactor
- The Scheduled Date can't be change if the MO have some planned WO.
(WO defines the scheduled date of the MO)
- Now the Scheduled Date 'date_planned_start' is set by default
with the deadline date if there is or now if there isn't (same than before).
- For MO, 'plan_date_finished' is now invisible. But keep the field
because it is used to set the date_expected of finished moves.
- Change the plan behaviour: Plan depending of the scheduled date if
this one is bigger than now, else try to plan as soon as possible.

task-2241471
2020-06-15 16:59:41 +02:00
William Henrotin 518621d707 [FIX] mrp: do not group bom by type anymore
Task : 2241471
2020-06-15 16:59:41 +02:00
Rémy Voet (ryv) f647b68243 [FIX] mrp: fix name of leave related to WO
Instead using production name + name of WO as name in the
leave record, use the display name of WO to reprensent uniquely
the leave (even this record is not really reprensent in views).

task-2241471
2020-06-15 16:59:41 +02:00
Rémy Voet (ryv) 38c375783f [FIX] (purchase_)mrp(_account): fix order stats button MO
Task: 2241471
2020-06-15 16:59:41 +02:00
yhu-odoo 5311f01e65 [REF] mrp: update MO according to "To Comsume"
Previously, when we upate the "Quantity to Produce" on a MO, we update
the components to consume according to the BOM we use. After this
commit, we now update the components according their current number set
on the MO.

For example, if we have a MO to use x component A to produce y product
B. When we update the number y to z, the number of A we want to consume
will be updated from x to x / y * z, regardless of the setting on the
BOM. If multiple components are used, all components will be updated
according to this rule.

Task: 2241471
2020-06-15 16:59:41 +02:00
Tiffany Chang (tic) 48672703aa [REF] mrp: update MO lock/unlock settings
This commit updates 4 features related to a MO being locked/unlocked.

1. Manufacturing orders are by default unlocked. A new configuration
setting has been added so users can set the default to be locked.
This setting only applies to new manufacturing orders after the setting
has been changed.

2. A MO now shows the same button options regardless if it is
locked/unlocked ('scrap', 'cancel', 'unreserve')

3. Workers can always change "Consumed Quantities"/"Produced" when
clicking on a component/finished product line unless state=Done and MO
is_locked. This includes adding new components/finished products.

4. Workers can now change "To Consume" quantity when clicking on a
component line, unlocked, and not in states 'Done' or 'Cancel'.

This is part of specification 6-Lock/Unlock of overall Editing in MO
form and backorders task.

Task: 2241471
2020-06-15 16:59:41 +02:00
Arnold Moyaux acb3150c89 [FIX] stock: No warning when consuming a dozen SN
On a move line tracked by serial number. Moving two pieces for
a serial number trigger a warning explaining that the quantity
should be 1 or 0. However modify the unit of measure from unit to
dozen is not a problem.

task-2241471
2020-06-15 16:59:41 +02:00
Arnold Moyaux 71964c20d0 [FIX] mrp: add move with different company
Currently the related on the property use the company in the context and
not on the current object. It implies that a raw move created on the MO
form view will have the wrong destination location and trigger the
check company error.

Use a compute instead of related.

task-2241471
2020-06-15 16:59:41 +02:00
Simon Lejeune b0a905a41d [REF] mrp: move plan_from to a wizard
task-2241471
2020-06-15 16:59:41 +02:00
Rémy Voet (ryv) 421d2d21aa [FIX] purchase_mrp: fix count MO in case of MTO
task-2241471
2020-06-15 16:59:41 +02:00
Arnold Moyaux 182f1b8e26 [REF] mrp: workorder onchange
Create the workorders at the onchange when setting the bom and not a
"plan" anymore.

task-2241471
2020-06-15 16:59:41 +02:00
Rémy Voet (ryv) 5011ec520c [REF] mrp: review consumption allowing
Now, by default, a Bill of Material have a flexible
consumption instead of strict consumption. Also
add new consumption choice: a flexible consumption
but with a warning when the bom isn't respected.
Also, now, the strict (a new warning option) consumption
is checked only when we try to mark as done the MO.

task-2241471
2020-06-15 16:59:41 +02:00
William Henrotin 0e2765f5fd [REF] mrp: no more produce wizard
Use a view similar as the pickings one.

task-2241471
2020-06-15 16:59:41 +02:00
Simon Lejeune 1b6421285c [REF] stock: allow using _set_quantity_done in onchanges
task-2241471
2020-06-15 16:59:40 +02:00
Simon Lejeune 93156e7c31 [FIX] stock: move: allow writing the same quantity done
..even if multiple move lines already exists.

task-2241471
2020-06-15 16:59:40 +02:00
Simon Lejeune 02359fd78b [FIX] stock: quantity done compute
mismatch on the move lines used by the compute.

task-2241471
2020-06-15 16:59:40 +02:00
Simon Lejeune bd250eb18a [FIX] stock: done quantity and reservation compute in onchange
Following v13, newId records are instances of NewID and are ignored from
any `read_group` call. This breaks an important feature: when encoding a
stock move line (thus, in an onchange context), the `quantity_done` field
of stock move should be recomputed.

task-2241471
2020-06-15 16:59:40 +02:00
Rémy Voet (ryv) 53252608d7 [REF] mrp: backorder mechanism
Allow to "backorder" a production, meaning create another manufacturing
order with the quantity remaining to produce. We also use the
reservation of the first order on the next ones by using
`post_inventory` on the first one and moving the newly created stock
moves to the backorder.

We introduce a wizard similar to the one in stock.
Backorders have a sub-sequence.
Backorders are linked together through the procurement group.
We allow creating a backorder even if workorders are running by closing
them, the backorder will call `button_plan` and create its own.

task-2241471
2020-06-15 16:59:40 +02:00
Simon Lejeune c660770ebd [REF] mrp: remove routing model
Set the operations directly on the Bill of Material.
Duplicate the demo data where a routing was shared.
Adapt the tests.

Remove the following feature:
    - set the same routing on parent and kit child bom
    - when planning, if the component of the kit have the same operation
      than a component of the parent bom, merge these operations

task-2241471
2020-06-15 16:59:40 +02:00
Laurent Smet beccf82e09 [REF] account: journal items reconciliation (part 1/2)
This commits refactors the code of the reconciliation, in order to facilitate the process of complex use cases, namely multi-currencies or cash-basis-taxes related (see details below). It also prepares the code for a second refactoring where we will save on each journal items the amount_currency and currency_id field (even in case of operation made in company currency), also in the sake of simplification.

1) Multi-currencies:
- the account.partial.reconcile model now will have dedicated columns to specify the amount of the partial reconciliation in the debit_line_id currency and the credit_line_id currency. That comes in handy when dealing with journal items having different secondary currencies, but also allows some simplification.
- residual_amount_currency computation changed accordingly
- moved models account.full.reconcile and account.partial.reconcile in their dedicated .py file

2) Cash basis taxes
- cash basis entries now handle correctly rounding errors to make sure the exact amount of gets reported when the reconciliation becomes full.
- the account for the base amount of cash basis entries has to be set, now, on the company instead of on each cash basis tax.
- that new 'property' field can be set at the CoA installation via the field property_cash_basis_base_account_id of account.chart.template, or going through the accounting settings.

Was task task: 2243420
Was PR #50308

Related: odoo/upgrade#1121
Related: odoo/enterprise#10252
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2020-06-15 08:36:04 +00:00
Laurent Smet f074772d25 [FIX] sale_stock: Fix test depending of 'account' running at_install
Since the chart template is loaded post_install, a test depending of the accounting
must always be run post_install.
2020-06-15 08:36:04 +00:00
Antoine Prieels 3a2d698480 [IMP] pos_six: Upgrade TIM JavaScript SDK
Upgrade the TIM JavaScript SDK to the latest version (4.6.0).
The version Six gave us initially (3.8.1) didn't return any error
message. We now have some (ugly) error messages that could at least
help the cashier understand where the problem comes from (e.g.
"timCommunicationFailure", "cardholderStop", etc.).

closes odoo/odoo#52181

Taskid: 2267818
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2020-05-29 14:05:38 +00:00
shreya thakrar 9a2f55f06c [FIX] stock: issue when opening view in studio
When user is in an operation. For example, a delivery, when user opens studio
and click on the move line, click on edit and close studio. The result is that
user can't create record anymore.

By this commit, this issue has been fixed.

task - 2170090

closes odoo/odoo#52101

X-original-commit: cc10d8bccada44041f62243ab4785a422f354aaa
Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
2020-06-15 12:08:35 +00:00
Pierre Masereel 5f174f1272 [FIX] point_of_sale: fix small issues of responsive
closes odoo/odoo#52871

Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2020-06-15 11:12:11 +00:00
Thibault Francois ab48798229 [FIX] timer, hr_timesheet: Fix _compute_display_timer_buttons
mixin method should not return in the middle of the loop
Use the value updated on the record instead

super() is called with self at every iteration
which is not very efficient and can be wrong

Solution call super for each specific record
and only when needed

write is not a good practice in compute method

closes odoo/odoo#52858

X-original-commit: 7e19ed98d18305370b5c14edd3d310cfea5df714
Related: odoo/enterprise#11100
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-06-11 14:00:06 +00:00
Krupal Oza a8ed0c000d [FIX] purchase_stock: Fix traceback while accessing purcase report
Since recent commit[1], from the report 'purchase.report' inherited in
purchase_stock, `effective_date` field is moved out from the query and
is placed inside the domain. However, `effective_date` field is not
available in 'purchase.report' and is part of the 'purchase.order'
and so moving it inside the domain results into a traceback.

This commit fixes the issue by adding this field from purchase.order to
purchase.report so domain works as expcted.

commit[1] - https://github.com/odoo/odoo/pull/49999/commits/b7115cc006fb15c935ceef41e8372b1d3ceb1462#diff-34545aa3f96ecc997188c974620118ee

closes odoo/odoo#52103

Taskid: 2263566
Closes: #52103
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-06-02 07:02:46 +00:00
lejeune quentin 7686e1bced [IMP] hw_drivers: Add possibility to add manually a printer to the IoT Box
The IoT Box detects printers automatically under certain conditions.
And so there are printers that are not detected by the box
and cannot be used in Odoo.
With this commit we give the possibility to add printers manually
with Cups and to be able to use them in Odoo.

closes odoo/odoo#52154

Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
2020-06-12 08:14:58 +00:00
Christophe Simonis 0116ccf288 [FIX] website_crm_partner_assign: assign value to existing field
Oversight of fc7bff8afb

closes odoo/odoo#52957

X-original-commit: f5c670e7265016d851ab4344a9f74c27216270a7
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-06-15 08:20:44 +00:00
Andrea Grazioso (agr-odoo) c1167baff5 [FIX] base_vat: override vatnumber check for ua vat
Create a contact:
- Company
- Country: Ukranian
- VAT: UA1234567890

Error will raise because the VAT is detected as invalid. This occur
because vatnumber package for Ukranian VAT check the length to be 8
while according to various sources [1][2] the number is

- 12 for companies
- 9 or 10 for individuals

[1] https://vat.international/ukraine/
[2] https://interbuh.com.ua/ru/documents/oneanalytics/123926

opw-2266940

closes odoo/odoo#52956

X-original-commit: 0f4c3b6a9930614397c61cef8b138985f2e2b708
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-06-15 08:20:25 +00:00
Andrea Grazioso (agr-odoo) 6ff646f150 [FIX] website_sale_stock: check cart before payment
Have a Storable Product configured to 'Show inventory below a threshold
and prevent sales if not enough stock' (availability settings). Have a
quantity available of such product, i.e 100
From the shop create 2 sessions with 2 different users A and B.

With both follow the steps in parallel:
- put 100 of product in cart
- go to checkout up to payment screen

Press 'Pay Now' with A (and confirm the order in backend if auto
confirm is not enabled so available quantity is updated)
Press 'Pay Now' with B

200 of product are requested because all cart checks for availability
are done before payment but not on the final step.

Adding a final step of check for availability

opw-2261598

closes odoo/odoo#52954

X-original-commit: 4d3f2fbdcda68d4f0e0bb3bb34d51e71d963621b
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-06-15 08:03:58 +00:00
Florian Gilbert 7db53df9cb [IMP] account & account_edi: Some visual improvements.
Hide invoice_origin field.
Hide partner_bank_id for customer invoice.
Remove margin-bottom for report layout in "base" module.
Hide electronic invoicing message for "Send & Print" action.

Task ID: #2277282

closes odoo/odoo#52953

Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2020-06-15 08:54:12 +00:00
Antoine Prieels 8a1af90cac [IMP] point_of_sale: Load demo data on PoS opening
If no product is loaded when opening the PoS, show a popup asking if
the user wants to load demo data.

closes odoo/odoo#52919

Taskid: 2276054
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2020-06-12 13:26:58 +00:00
Antoine Prieels 1759a17c0e [IMP] point_of_sale: Hide tips and discount products
Hide the tips and discount products from the ProductScreen.

TaskID: 2276054
2020-06-12 12:13:22 +00:00
shs-odoo 2fc5180acf [IMP] account: Improve the account move list view
Purpose of the task is to improve on accounting listviews.

So in this commit, following list view are improved
- view_move_tree
- view_invoice_tree

Improved decoration and apply the new badge widget.

closes odoo/odoo#52358

Taskid: 2267578
Closes: #52358
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2020-06-15 08:17:15 +00:00
Jinal Patel 67d17a6cdf [FIX] hr_expense: Fix missing upload button on expense
currently, the upload button is removed in commit: https://github.com/odoo/odoo/commit/45f3659305359fff5b0c7bf3de7d49a25ba5c36d#diff-1db56050134b0962604e0407b7d23d39R41
But it should be displayed on list view.

So in this commit, show 'Upload' button on Expenses list view.

closes odoo/odoo#52341

Taskid: 2267580
Closes: #52341
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-06-03 11:47:00 +00:00
Kevin Baptiste 6267d5978c [IMP] base: new widgets in partner list view
Use the new widgets in the list view of res_partner.

closes odoo/odoo#52897

Taskid: 2274257
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-06-12 09:09:55 +00:00
Nicolas Lempereur a8e9a81814 [FIX] web_editor: translatable after pasted translation
Fixes same issue as b836e00d70 but for `<div/>` tag.

When we translate html content, all text and (currently) this subset of
inline tags are allowed inside translations: 'abbr', 'b', 'bdi', 'bdo',
'br', 'cite', 'code', 'data', 'del', 'dfn', 'em', 'font', 'i', 'ins',
'kbd', 'keygen', 'mark', 'math', 'meter', 'output', 'progress', 'q',
'ruby', 's', 'samp', 'small', 'span', 'strong', 'sub', 'sup', 'time',
'u', 'var', 'wbr', 'text'.

In b836e00d70 an issue was fixed that `<p/>` would possibly get inside
translation when copy-pasting, testing some scenario in current chromium
browser (83.0) it seems the pasted content contains `<div/>` tags.

opw-2259367
opw-2260711
closes #52592

closes odoo/odoo#52932

X-original-commit: eed9fb771521143c0b514d96b5efdcb9715051f0
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2020-06-12 15:39:25 +00:00
Nicolas Lempereur b4b0828e25 [FIX] sale: have online salesperson default working
A sales order on the website will have as salesperson:

- the contact salesperson, and if not set

But if it's not a new address, the "Online orders" > "Salesperson" is
not used.

With this changeset, the "Online orders" > "Salesperson" is used by
default if there is no salesperson on the partner as was the intention.

opw-2274665
closes #52933

closes odoo/odoo#52939

X-original-commit: 957361a5c44b3797318657ce2486a3eff2a3f651
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2020-06-12 17:29:03 +00:00
oco-odoo d49d1e4437 [IMP] account: reconciliation models: match amls whose partner's name is contained in payment reference
Invoice matching rules now also match account.move.lines based on their partner's name : if the statement line's payment reference contains the first name and last name of its patner (in any order, at any position), we match the move line.

closes odoo/odoo#50083

Related: odoo/enterprise#10166
Related: odoo/upgrade#1317
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2020-06-12 16:26:48 +00:00
oco-odoo faed88d209 [IMP] account: reconciliation models: introduce partner mapping
Partner mapping is a new field defined on invoice matching reconciliation models. It allows defining a mapping between partners and regular expressions. When ran, on a statement line without any partner set, those rules use this mapping to assign a partner to statement lines without any one set, using the regular expressions to match the payment reference of the statement line.

It is important to note that the mapped partner will only be set to the statement line when the reconciliation is actually performed (so, when clicking the validate button, if the matching rule is not auto_reconcile = True), just like with the partner_map.
2020-06-12 16:26:42 +00:00
oco-odoo 02f7023b54 [IMP] account: introduce a date limit on the application of reconciliation models
This limit is set by the past_months_limit field of reconciliation models. When set, it specifies the number of months in the past to search for matches when using this model. Older move lines will be ignored.

The point of this feature is to exclude too old stuff that we know we won't reconcile (because of import, old misconfiguration, former misuse of some features, ...). It also allows reducing the number of move lines taken into consideration, and solving perfomance issues functionnally by isolating the move lines into smaller periods to reconcile them separately.
2020-06-12 16:26:01 +00:00
oco-odoo cddd132ae8 [REF] account: reconciliation models: improve performance
When opening the reconciliation widget and calling the matching rules, instead of calling all the rules in a single huge SQL query and then iterating on all the statement lines to match them with the results, we now first group the lines per applicable model and each time call a distinct (but way smaller) query for each group, stopping trying other rules for a statement line when one returns candidates. More queries are performed, but they are way more simple.
2020-06-12 16:25:49 +00:00
Laurent Stukkens (LTU) ab72fe6c46 [IMP] web_editor: scroll smoothly when dragging snippets
Part of https://github.com/odoo/odoo/pull/51236
task-2176020

closes odoo/odoo#51236

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-06-12 20:29:09 +00:00
Laurent Stukkens (LTU) 0d06773f14 [IMP] web_editor: fix drag&drop css issue
Part of https://github.com/odoo/odoo/pull/51236
task-2176020
2020-06-12 20:08:05 +00:00
Laurent Stukkens (LTU) 8a0a17fab9 [IMP] website: keep focus on snippet when moving up or down
Part of https://github.com/odoo/odoo/pull/51236
task-2176020
2020-06-12 20:07:51 +00:00
Laurent Stukkens (LTU) 5b7317b53f [IMP] web_editor, website: remove unnecessary move options
Part of https://github.com/odoo/odoo/pull/51236
task-2176020
2020-06-12 20:06:59 +00:00