Commit Graph
29 Commits
Author SHA1 Message Date
Goffin Simon d3dc5048e4 [FIX] purchase_requistion: Duplicate purchase agreement with "Run sch…
…eduler"

Steps to reproduce the bug:

- Let's consider P a product with routes "buy" and "mto" and with
purchase_requistion = 'Propose a call for tenders'

- Let's consider a BOM B with P as component

- Create a MO for B

- Run the scheduler two times

Bug:

Two purchase agreements have been created for the the same MO.

opw:1882280
2018-09-06 16:05:13 +02:00
Goffin Simon 787a156f0d [FIX] purchase_requisition: origin and partner_ref erased by a requisition
Steps to reproduce the bug:

- Create a product P with routes MTO and BUY
- Set a vendor V on this product
- Create a BOM B with P
- Create a MO M with B
- A RFQ is created with M as origin
- Create a purchase requisition PR with vendor V
- Set PR as purchase agreement on the RFQ

Bug:

- The field origin with M was erased by the name of PR
- The field partner_ref was erased by the name of PR

The fix is inspired by: c914df5a36

opw:1860430
2018-06-27 13:30:09 +02:00
amoyaux c914df5a36 [IMP] stock,mrp,purchase: split _run method and move it to rules
Previously mrp, stock and purchase used _run methon on procurement
group and start with a if checking for the action type. This commit
instead launch a specific method depending the rule's action's type

Also _run method and their submethod used in procurement group
was always called with a rule. Thus we choose to move this method
on the rule object himself.
2017-09-08 17:08:06 +02:00
Fabien Pinckaers 0e4f3bb959 [IMP] stock: remove procurement orders to fufill immediately
This removes the procurement.order model. To fufill their needs SO, PO, MO and
stock moves now call the _run method of the relevant procurement.group.

This mecanism is now only used for stockable product, tasks now uses their own
independent mecanism.

The _run method will check all the applicable rules and create directly the
needed model to fufill the need.

The modules stock, purchase, mrp, extends the _run method to implement their
specific strategy relevant for the rule type they define.

If an exception happens the message will be logged as a mail messsage on the
source model, for example, if a sales order cannot be fufilled the salesperson
will now see directly the reason.

OLD commit messages:
[WIP] procurement: removing procurement.order in stock, sale, purchase, sale_stock. WIP
fixup! [WIP] procurement: removing procurement.order in stock, sale, purchase, sale_stock. WIP
[IMP] Basic tests
[FIX] test not necessary anymore
[FIX] remove unnecessary print statement
[FIX] unnecessary test + why passing warehouse worked before?
[IMP] purchase: one move by purchase order line
[FIX] purchase: correct inventory tests and pass move_dest_ids among procurements
[FIX] because of bad cherry-pick merge
[IMP] make mrp pass by adding move_dest_ids there too
[IMP] tests of sale_mrp, no need for cancelpropagation then
[IMP] better to consistently use recordsets also for one2many
[FIX] purchase_requisition
[FIX] Exceptions should trigger errors, which should be caught in the tests
[FIX] sale_mrp: remove usage of procurement.order and use sale order name instead of sol
[FIX] stock_dropshipping: add sale_line_id on purchase_line_id
[FIX] Remove pdb
[IMP] add stock_dropshipping files
[IMP] stock: search carrier through sale line instead of procurement group
[IMP] add procrule test and preision needed when updating sol
[FIX] sale_order_dates + [IMP] procurement exceptions by scheduler
[FIX] No need to return task
[IMP] move file as name changes and add corrections
[FIX] Continue Run Schedulers wizard fix
[FIX] name issues of takss
[FIX] updating sale order line, but there is still a problem with the recompute
2017-09-08 17:08:05 +02:00
Christophe Simonis dd43071638 [MERGE] forward port branch saas-16 up to 278e478d55 2017-06-27 14:19:31 +02:00
Christophe Simonis 34b432d528 [MERGE] forward port branch saas-15 up to 4d79a1ff58 2017-06-26 19:19:39 +02:00
Christophe Simonis e1c74e374c [MERGE] forward port branch saas-14 up to 3bac72ba74 2017-06-26 14:04:04 +02:00
Christophe Simonis 3bac72ba74 [MERGE] forward port branch 10.0 up to aaadb232b2 2017-06-26 13:00:18 +02:00
Christophe Simonis 6981320d01 [MERGE] forward port branch saas-11 up to 79dfcde359 2017-06-21 18:28:26 +02:00
Olivier Dony 5d2869cbc8 [MERGE] Forward-port saas-16 up to ba15df47cb 2017-06-01 01:46:13 +02:00
Olivier Dony ba15df47cb [MERGE] Forward-port saas-15 up to 17b847c0f6 2017-06-01 01:10:29 +02:00
Olivier Dony 5dd2cc8e63 [MERGE] Forward-port saas-14 up to b9e2207267 2017-06-01 00:37:30 +02:00
Olivier Dony b9e2207267 [MERGE] Forward-port 10.0 up to 7e44444878 2017-06-01 00:15:27 +02:00
Thomas Binsfeld 2742722d36 [IMP] purchase_requisition: prepare method for order lines creation
Closes #16080

Add a prepare method easy to override in Purchase Requisition Line to create the dictionary of values for order line creation
2017-05-30 11:40:43 +02:00
Thibault Delavallée 0849677548 [FIX] purchase_requisition: fix taxes_id field being created with records instead of ids
Fixes #16222
2017-05-29 16:32:45 +02:00
Xavier Morel b897dcde15 [FIX] P3: import pattern which doesn't seem to work right
``import odoo.addons.foo as bar`` doesn't seem to properly trigger the
import hook in Python 3 (it blows up on decimal_precision and
base). Thus convert *all* examples of that pattern to the more
sensible ``from odoo.addons import foo as bar``.
2017-05-22 13:30:50 +02:00
xmo-odoo b4429c2a91 [FIX] Various P3-related import changes
* LDAP import: python-ldap is not python3-compatible, pyldap is

  Warning: only supported from debian Stretch (current testing)?
  https://packages.debian.org/search?searchon=names&keywords=pyldap

* implicitly relative imports
* imports of moved or removed stdlib modules

issue #8530
2017-04-28 09:06:53 +02:00
Dhaval Panchal 5c837dec2a [REF] stock, etc: rename picking type by operation type
As picking types aren't always used in a picking context, and picking
aren't really meanigful for a lot of people, we rename this concept as
"operation type" in views and in the planner.
2017-02-17 13:21:58 +01:00
Jérome Maes 13f84b9aca [REM] *: remove ir.needaction mixin
ir.needaction_mixin is not used anymore by the webclient.
From 9.0, the concept has changed: this feature is now
available in mail module, with the mail.thread mixin,
and message_neeadction field.

Remove all code handeling needaction bullet and
counter on ir.ui.menu, knowing that since 9.0
webclient does not display the counter anymore.

This code was, thus, useless and some RPC calls
were done for nothing, and adapt accounting
reconcialiation widget.
2016-12-05 11:30:03 +01:00
Denis Ledoux cf98d58f88 [FIX] *: fix product.uom._compute_price method calls
During the conversion to the new api,
the method `product.uom`.`_compute_price` has had its signature
changed.

Formerly, it was:
`def _compute_price(self, cr, uid, from_uom_id, price, to_uom_id=False):`
Now, it is:
`def _compute_price(self, price, to_unit):`

Basically:
- the first argument `from_uom_id` is removed, and you now should
call this method from the model record directly
- the last argument is no longer a kwargs

Some calls to this method were still done the former way:
 - Some have been added during forward ports
 - Some are oversights when this method has been converted to the new api

This revision corrects the calls that were still done the former way
to the new way.

opw-694871
2016-11-24 11:33:38 +01:00
Christophe Simonis 6466aa499f [MERGE] forward port branch saas-12 up to 00f4547 2016-10-19 18:09:53 +02:00
Christophe Simonis 00f45470da [MERGE] forward port branch saas-11 up to 8411b89 2016-10-19 17:56:52 +02:00
Christophe Simonis 235ed4b2c1 [MERGE] forward port branch saas-12 up to 9ad5f26 2016-08-20 18:08:19 +02:00
Thibault Delavallée 838a6f2000 [FIX] varioius: fix digits_compute attribute changed to digits in new API 2016-08-09 11:00:10 +02:00
Thibault Delavallée 0f0ca1c133 [REF] product_uom, *: clean quantity computation methods
product_uom._compute_quantity is an ensure one multi method taking a browse
record as second paramter. It replaces _compute_qty and _compute_qty_obj
to have a single and standard computation method.
2016-08-01 15:05:32 +02:00
Thibault Delavallée f3d6a54e36 [REF] product_uom, *: clean price computation method
product_uom._compute_price() is now an ensure_one multi methods, taking
a browse record as second unit. This helps simplifying and unifying the
various calls and price computation methods.
2016-08-01 15:05:32 +02:00
Christophe Simonis 93e6316029 [MERGE] forward port of branch saas-11 up to 7153077 2016-06-28 18:05:25 +02:00
mdi-odoo 03c269d9b1 [MIG] purchase_requisition: Migrated to new API. 2016-06-08 11:53:58 +02:00
mdi-odoo 7840a0c25c [MOV] purchase_requisition: Re-organized directory structure. 2016-06-08 09:16:07 +02:00