Commit Graph
136527 Commits
Author SHA1 Message Date
Nicolas Martinelli 2399b59e28 [FIX] mrp: state of flexible MO
- Create flexible BOM for product P
- Create a MO for 5 units
- Produce 3 units
- Post the inventory
- Cancel the MO

The MO remains 'In Progress'.

In case of a flexible BOM, the quantity produced is compared to the
quantity to produce to know whether the MO should be done. In this
specific case, however, the MO should be closed.

It's not possible to rely on the move states in this case, so we
force the MO state.

opw-2270279

closes odoo/odoo#53010

X-original-commit: c99fe9dc5b5054d8d92b7283ad9f27f150de410b
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-06-16 06:20:26 +00:00
jerome hanke (jhk) 3aaa0088cf [FIX] crm: opportunity meetings filters are set based on id
Steps to reproduce:
- install crm
- go to crm > configuration > settings > activate leads
- go to a contact > click the "opportunity" smart button >
create an opportunity > select the newly created opportunity > click
the "meetings" smart button

Previous behavior:
meetings are filtered with 'search_default_opportunity_id' set to active_id.
active_id is referring to the partner_id in this case. this leads to
a cache miss error.

Current behavior:
meetings are filtered by the right opportunity (current id).

opw-2272325

closes odoo/odoo#53013

X-original-commit: b9abc757da3034209b083c4ba862edd3865f7637
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: mightyjol <jhk-odoo@users.noreply.github.com>
2020-06-16 06:27:40 +00:00
Xavier Morel add22ec8ef [FIX] base: change password wizard should be restricted to ERP managers
ACLs on the wizard lines should match that of the wizard, otherwise
ERP managers can see the action but get an error as soon as they open
the wizard.

Since ERP managers have write access on arbitrary users, that's
probably the right group to use.

Task 2275134

closes odoo/odoo#53007

X-original-commit: 657d44f08c402bc0547b7cbb01c2d447e641d062
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2020-06-16 06:04:48 +00:00
Christophe Monniez 0e1ce4c660 [IMP] core: bump master release version to 13.5
closes odoo/odoo#52991

Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2020-06-15 19:57:53 +00:00
3fea5b2136 [REF] mail, *: refactor messaging with OWL
This commit is a significant rewriting of client-side discuss, chatter,
chat window, and messaging menu using OWL. The behavior should be broadly
the same, with some slight functional changes here and there.

From a technical standpoint, the code of messaging is mainly organized in 2
main groups of modules:

- models, which are logical entities that depict the client-side state of
  messaging as a whole.
- components, which are in charge of displaying information from models.

This refactoring also introduces new JS guidelines regarding folder structure
(/static) and naming rules for JS modules.

Community PR: https://github.com/odoo/odoo/pull/39023
Enterprise PR: https://github.com/odoo/enterprise/pull/6249

Task-1914207

This PR is a collaborative work by Alexandre, Julien, Sébastien and Xavier,
with the precious help of Lucas to speed it up towards the end.

closes odoo/odoo#39023

Related: odoo/enterprise#6249
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Co-authored-by: Alexandre Kühn <aku@odoo.com>
Co-authored-by: Julien Giannone <jgi@odoo.com>
Co-authored-by: Lucas Perais <lpe@odoo.com>
Co-authored-by: Sébastien Theys <seb@odoo.com>
Co-authored-by: Xavier Dubuc <xdu@odoo.com>
2020-06-15 18:12:21 +00:00
Aurélien (avd) 0a82848606 [FIX] hr_expense: fix traceback when creating a report
closes odoo/odoo#52969

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-06-15 15:14:22 +00:00
Odoo's Mergebot 69c48add32 [MERGE] mrp, etc: ease production order edition
Ease manufacturing order edition in allowing to edit in the tree view.
Consider that one manufacturing order = 1LN/SN and create back-orders
in case several of them should be produced in the same MO.
Ease definition of operations and their different steps by allowing to
do it in the same BoM screen.

joint work Simon Lejeune <sle@openerp.com>
joint work Arnold Moyaux <arm@odoo.com>
joint work William Henrotin <whe@odoo.com>
joint work =?UTF-8?q?R=C3=A9my=20Voet=20=28ryv=29?= <ryv@odoo.com>
joint work yhu-odoo <yhu@odoo.com>
joint work "Tiffany Chang (tic)" <tic@odoo.com>

task-2241471

closes odoo/odoo#52949

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2020-06-15 19:41:25 +02:00
Andrea Grazioso (agr-odoo) 83bb79677c [FIX] account: multicurrency of bank statement reconciliation
- Activate multicurrency and use a 1.5 rate on USD to EUR (to ease
calculations)
- Create two customer invoices in EUR (company is in USD) for two
different partners (e.g. partner1 and partner2) with only one line and
an amount of 100 EUR (removed the tax as well so that payment term line
is 150 USD on receivable account)
- On the "Invoices Matching Rule" reconciliation model:
1. Set Amount Matching to 90%
2. Define any account for the counterpart
3. Remove "Same Currency Matching"
4. Ensure "Partner Is Set & Matches" is marked

- Then create a new bank statement with two lines as follows:

1. dummy label, partner1, 140 USD
2. dummy label, partner2, 100 USD

- When clicking on reconcile,

1. the line for partner1 is not matched
2. the line for partner2 is matched

This occur because the amount from the invoice is not correctly
converted in company currency before making the check with the bank
statement amounts

opw-2261134

closes odoo/odoo#52529

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2020-06-15 15:20:26 +00:00
Simon Lejeune 249a1a7541 [FIX] mrp: bunch of fixes
Bunch of last minute fixes including:
- serial handling in tablet view
- expected durations and backorders
- button unplan unlinks the leave but the computed aren't recomputed
  then we need to manually set the date_planned_start/finished
  then we need to not propagate them on the related document
  (move/production) because they are required
- operation company_id wrongly set

task-2241471
2020-06-15 16:59:42 +02:00
Arnold Moyaux 05607f945b [IMP] mrp: move embeded workorder view to global view
task-2241471
2020-06-15 16:59:41 +02:00
Arnold Moyaux 556a905166 [REF] mrp: byproduct onchange
Create the byproduct moves at the onchange.

task-2241471
2020-06-15 16:59:41 +02:00
Arnold Moyaux ed7012e8fd [REF] mrp: workorders for enterprise
Removed abstract workorder

Removed the integration of expiry wizard in tablet view since it should
be moved in enterprise in the tablet view implementation (not possible
to set consumed lot on workorders on community anymore)

Refactor _set_quantity_done to use ORM command in order to not return a
dict with vals to_create/to_write

task-2241471
2020-06-15 16:59:41 +02:00
Simon Lejeune 4060387988 [REF] mrp: start next workorder (community)
task-2241471
2020-06-15 16:59:41 +02:00
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
Andrea Grazioso (agr-odoo) 482ff59fa3 [FIX] account: display "Amount Matching" on "Same currency matching" false
- Activate multicurrency and use a 1.5 rate on USD to EUR (to ease
calculations)
- Create two customer invoices in EUR (company is in USD) for two
different partners (e.g. partner1 and partner2) with only one line and
an amount of 100 EUR (removed the tax as well so that payment term line
is 150 USD on receivable account)
- On the "Invoices Matching Rule" reconciliation model:
1. Set Amount Matching to 90%
2. Define any account for the counterpart
3. Remove "Same Currency Matching"
4. Ensure "Partner Is Set & Matches" is marked

- Then create a new bank statement with two lines as follows:

1. dummy label, partner1, 140 USD
2. dummy label, partner2, 100 USD

- When clicking on reconcile,

1. the line for partner1 is not matched (although it respects the 90%
param)

So 'Match amount' is still effective, while it is not shown in the view.
This should not occur. Removing the invisiblity conditions to avoid
the inconsistency.

opw-2261134
2020-06-15 14:39:27 +00:00
Odoo's Mergebot a54b01fc9e [IMP] Timesheets: Back2basics
Add internal project to ease the onboarding
Move timer to enterprise

taskID: 2217930

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

closes odoo/odoo#52585

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-06-15 18:29:17 +02:00
william 38f03c4c8a [IMP] l10n_au: add Australian reports menuitem
Done in commuity so that other modules can inherit from it, but only
used in enterprise's l10n_au_reports for now.

closes odoo/odoo#49581

Related: odoo/enterprise#9907
Signed-off-by: Josse Colpaert <jco@openerp.com>
2020-06-15 14:09:17 +00:00
william 236600fd5e [IMP] l10n_au: taxes and fiscal positions for TPAR
Add new taxes and fiscal positions managing the new taxes.
The taxes set on the services are replaced by the taxes setting the
right tags on the move lines in case of suppliers that should appear in
the TPAR.
In case the ABN was not quoted, a special tax with a negative line
computes the tax withheld should be used.
2020-06-15 14:09:17 +00:00
william 6b1d0a7ac3 [IMP] base_vat: add example of Australian ABN for error msg 2020-06-15 14:09:17 +00:00
william 9a8fd8ba36 [IMP] account: improve usability of taxes for goods/services
Help search taxes more easily by adding an applicability field stating
that the tax should be used only on goods or on services. If not set,
can be used anywhere.
2020-06-15 14:09:17 +00:00
Thibault Francois 7f83e0286e [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

X-original-commit: 7e19ed98d18305370b5c14edd3d310cfea5df714
2020-06-15 15:51:20 +02:00
jbm-odoo d6a23144d5 [MOV] timer: Move to Enterprise
taskId: 2217930
2020-06-15 15:51:20 +02:00
jbm-odoo e7dda3fab0 [IMP] project_timesheet: Add internal project by default to ease onboarding
taskId: 2217930
2020-06-15 15:50:19 +02:00
Kevin Baptiste 139fbf292c [IMP] hr_expense: add image on nocontent helper
The nocontent helper now shows a more descriptive image and a link to
the mobile application.

closes odoo/odoo#52972

Taskid: 2277641
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-06-15 12:53:24 +00:00
fw-bot 23d84139db [IMP] account: Allow to extend select of communication_flag
communication_flag in the SELECT is used to determine candidates for automatic reconciliation.
Extracting this part allows to customize the behaviour implied by the use of match_total_amount and specifically the warning "This parameter will be bypassed in case of a statement line communication matching exactly existing entries" to avoid an automatic reconciliation when the amount doesn't match.

closes odoo/odoo#52731

Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2020-06-15 14:02:51 +00:00
std-odoo 65d89ad132 [IMP] crm: improve CRM views
Purpose
=======
Rename "Follow-up" tab into "Extra Information" in the lead form view
Remove the create option on the language field in the lead form view.
Align vertically the expected revenue with the PLS in the lead form view.

Add the "Planned revenue" label in the quick create form.

Improve the pipeline activities default filter.

Improve the sale team form view.

Task-2277242

closes odoo/odoo#52965

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-06-15 13:36:36 +00:00
Aymane (ayt) 8df6aec234 [IMP] mail, sms: support keydown based change event in char fields using an option
PURPOSE

Avoid flickering and incorrect display of warning box in SMS when updating
the number to contact.

SPECIFICATIONS

Currently when an user uses composer to send an SMS, number is validated
at onchange. It leads to two issues

  * jump of content as a warning box appears;
  * visual warning displayed after user may have clicked on "Send"
    button, leading to warning not being useful;

We choose to validate number in real time in order to give directly
a feedback to the user. It also lessens flickering on composer screen.
This is done by allowing to trigger the 'change' event on key down. This
requires a specific onchange_on_keydown option to be used on char field.

LINKS

Task ID 2229050
PR #51159

closes odoo/odoo#52962

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-06-15 13:26:13 +00:00
Thibault Delavallée 89c0062527 [MOV] mail: move message technical template into data and correctly name assets file
Task ID 2265592
PR #
2020-06-15 13:26:13 +00:00