- Nov 07, 2019
-
-
Arnold Moyaux authored
Usecase to reproduce: - Create a purchase requistion with type Call For Tender - Update a line and set the price to zero. UserError 'You cannot confirm the blanket order without price.' raised. It happens because the write don't process the same check than create and don't check if the purchase_requistion is a blanket order or a call for tender. It also doens't check the current state of the purchase_requisition. closes odoo/odoo#39973 Task: 2120211 X-original-commit: 7d69f014 Signed-off-by:
Arnold Moyaux <amoyaux@users.noreply.github.com>
-
- Sep 13, 2019
-
-
Simon Lejeune authored
When a blanket order is opened, a supplier info is created and should be used in priority over a regular supplier info with the same values. That's what rev [0] tried to do but there was some mistakes: the `purchase_requisition_id` field added in the order is ignored since it isn't stored and the test didn't failed because the created blanket has a lower price unit than the regular supplier info, meaning it is used in priority. Setting the same price unit (50) result in the new purchase order line merged in the first one. Do not re-implement the same order. Adapt the test now that we know the order didn't work (see rev[1]). The user has to manually set a higher priority to the supplier info generated by the purchase requisition. [0] e85838d3 [1] 2ac4f2ee closes odoo/odoo#36840 Signed-off-by:
Simon Lejeune (sle) <sle@openerp.com>
-
- Sep 03, 2019
-
-
Arnold Moyaux authored
Adapt purchase_requisition to the multicompany changes. task-1985992
-
- Aug 16, 2019
-
-
lbs-odoo authored
Improve searchviews UX in all the modules TaskID: 2029731 closes odoo/odoo#35700 Signed-off-by:
Yannick Tivisse (yti) <yti@odoo.com>
-
Prakash Prajapati authored
When the many2xxx field relates to a model where company_id is required, set this domain [('company_id','=',company_id.id)] When the company_id field of the related model is not required, set this domain ['|',('company_id','=',company_id.id),('company_id','=',False)] When setting the domain on a field which is in the treeview of a xxx2many field evaluate against the company_id of the 'parent'. Some constraints have been added on sereval models. Take a look at the complete specification for more details. TaskID: 2024446 Closes: #35266 Signed-off-by:
Yannick Tivisse (yti) <yti@odoo.com>
-
- May 29, 2019
-
-
Yannick Tivisse authored
The goal is to be coherent with the user property. Actually, company_id and company_ids on the environment are no fields. Calling env.company_id returns a browse record, not an id.
-
- Jul 17, 2019
-
-
Adrian Torres authored
Multi is the default api for methods, it is not necessary to explicitly decorate methods with it, adds clutter and most people use it because they see that the rest of the code uses it. Done with `find . -type f -name '*.py' | xargs sed -i '/@api.multi/d'`
-
- Jul 03, 2019
-
-
Mitali Patel authored
Since previous commit moved decimal_precision module's feature into base, use the new syntax for fields declaration Remove the imports to the removed module Remove the module from dependency in manifest sed -i "s|digits=dp.get_precision('\([A-Z a-z]*\)')|digits='\1'|" **.py sed -i "/from odoo.tools import decimal_precision as dp/d" **py
-
- May 28, 2019
-
-
Priyanka Kakadiya authored
Enforce the domain of the UOM not by an onchange but by a domain. Exemple of issue if the domain is enforce by an onchange: - create a picking - add a move - select the product - select an uom > the uom presented are the one from the product category. -Save - edit - select an uom > all UOM are presented even the ones of other categories This commit enforce this new logic at most places. task: 1886272 closes odoo/odoo#33083 Signed-off-by:
Simon Lejeune (sle) <sle@openerp.com>
-
- May 16, 2019
-
-
Jinal Patel authored
purpose of this task is do not set default purchase representative in the purchase order when the PO is created automatically. When the purchase order is created automatically, this purchase order would be assigned to odoobot. Odoobot is not a real user. so nobody notified any activity of that purchase order. so keep the responsible field empty when the PO is created automatically. Purchase manager can easily filter "unassigned" purchase order and he can assign unassigned PO to someone (real user). Task-1940489 closes odoo/odoo#31729 Signed-off-by:
Simon Lejeune (sle) <sle@openerp.com>
-
- May 13, 2019
-
-
Yannick Tivisse authored
Purpose ======= Allow the user to select the allowed companies for which he wants to see records on top of selecting his current company. It is confusing for users to see the records from the company he is connected to and the records of the children companies. Instead of using the hierarchy of companies to access records across companies, the user can now select (from his set of allowed companies) the companies for which he wants to access records. /!\ This means that the user will interact with records from company A when in company B. Example: a SO has been created and confirmed in A. When in B, I create the invoice from it. Specifications ============== 1/ Deprecate the parent/children hierarchy on the res.company model. The fields are kept on the res.company model to ensure the retro-compatibility, but won't be used accross the standard code anymore. The only functional usage for this mechanism was to allow to see records from several companies by creating a virtual parent company, which will be possible with the new mechanism. 2/ By default, a user will only see the records of the company he is connected to (or records without a company). (It is still editable by the user if needed). For that, put this information in the user context, to allow having different configurations on different browser tabs. Instead of having domains like ['|', ('company_id', '=', False), ('company_id', 'child_of', user.company_id.id)] you'll have something like ['|', ('company_id', '=', False), ('company_id', 'in', company_ids)] Note that the 'company_ids' is a value that is passed in the evaluation context on the record rule, as we already have user, or time. company_ids is a list of the ids of all the enabled companies in the user's context. 3/ Out of the generic improvements brought by this task, this will illustrate issues that could exist since several versions. For example, it should not be possible to create a scrap order for the company A with a package of the company B, or it should not be possible to create an invoice on the company A with payment terms from the company B. Before the version 12.0, it was easy to encounter this kind of issues as the admin was the SUPERUSER_ID. A positive side effect of the fact that the SUPERUSER_ID has become an inactive user was to make it more difficult to introduce mismatch on the records, but haven't solved the issue, as it was still possible to do it with parent companies configuration. Some of these issues have been fixed in this commit, but all the business flows should be re-tested to check if an ir.rule should be introduced (eg: a multi company rule for stock.quand.package), if the company of a record is correctly transfered to another record created from the first record (eg: From a SO, create an invoice and a payment, the company of the sales order should be transfered on the invoice and the payment, even if the company of the sales order is A and I'm logged into the company B with the company A enabled. 4/ Currently, if I click on a button on a notification email (example 'View Task'), I face a traceback if I'm not logged into the company of the record. Now, if you click on a button and if you have access to the record, the correct company will be automatically set. 5/ If I display a kanban view with several records from several companies (and an image), all the images should be displayed. 6/ Currently if you copy paste an url, this will crash if you're not in the correct company. This won't be fixed because it's quite impossible to do it in a clean way. This task brings a workaround. Copy/Paste -> Traceback -> Log into the correct company, re-copy/paste -> Ok. 7/ 2 property methods have been added on the environment to retrieve the company on which the user is logged in and the companies the user enabled, on a specific tab. That way, when creating a record, instead of doing default=lambda self: self.env.user.company_id do default=lambda self: self.env.company_id On the other hand, to retrieve the enabled companies, do companies = self.env.company_ids 8/ Modify the Company Switcher widget to allow to log into another company WITHOUT writing on the res.users (and thus bringing cache invalidation issues and so on). Also allow to enable several companies and see records from several companies, and independantly of the other browser's tabs. 9/ When focusing on a tab, save the current company configuration on the local storage. That way, when doing 'CTRL+T' or a middle click, the context is propagated to the new tab. 10/ Improve the error message in case of multi company access errors. Now, when the user is in debug mode, display the related names of the records and the name of the user who brings the issue. 11/ Remove the context erasing when writing on a res.users This is probably coming from the migration to new API of the base module. The context was not propagated at this moment, which was a common mistake at that time. When migrating the module, probably by using the 'black box' method, as the context was not propagated, it was erased on the new version. This is now an issue because the context (i.e. the enabled companies) was erased when writing on a res.users, leading to tracebacks. See: https://github.com/odoo/odoo/commit/7eab8e26d3d46c53f4be924d6a34e80a66e74960#diff-4c2e738ee8f64f11806c889ea097b5e7R624 12/ Fix the crash manager on redirect warnings. The issue is the following - Create an invoice on a company without a configured CoA. - Set a partner - On the onchange_partner_id, a redirect warning is raised to propose you to configure a CoA - Click on 'Go to the configuration panel' - A generic warning says something like 'Do you want to discard your changes?' - Click on yes, the page refreshes, but not on the redirect action. Now, set correctly the action on the hash, and reload instead. The breadcrumb is lost for example, but you reach the correct action at least. 13/ Introduce a res.group to enable/disable the multi company per tab feature. 14/ To help the users to know which tab is in which company, add the possibility to have a favicon per company. When creating a company, the classical 'O' icon is colored by default in a random color. 15/ Remove the company switcher on the frontend. This was mainly there to allow a user to swicth to the company linked to the website. This behavior is now transparent to the user. If the website A is activated, then the company set on the context is the company of the website. 16/ Deprecated the _company_default_get method on the res.company model. Remove the method _get_company on the res.users model. 17/ Add 'allowed_company_ids' and 'current_company_id' on the pyeval context. You can now use those variables on domains in the views to access directly to the activated company.ies on the current tab. TaskID: 1960971 closes odoo/odoo#32341 Signed-off-by:
Yannick Tivisse (yti) <yti@odoo.com>
-
- Apr 05, 2019
-
-
Graeme Gellatly authored
Call super on overridden `_prepare_sellers` method in purchase_requistion. Closes #31649 opw-1963883 closes odoo/odoo#32470 Signed-off-by:
Nicolas Martinelli (nim) <nim@odoo.com>
-
- Mar 20, 2019
-
-
Nicolas Martinelli authored
When creating a new PO from a purchase requisition, the order date of the PO is the last date of the contract. There is no reason for this, and althoguh the date can be manually changed, it is error-prone. opw-1937141 closes odoo/odoo#31969 Signed-off-by:
Nicolas Martinelli (nim) <nim@odoo.com>
-
- Mar 07, 2019
-
-
Swapnesh Shah authored
uom_po_id is the 'Purchase Unit of Measure' and is required so should be used here. This way, the onchange matches the behaviour of purchase module or the reset of the purchase_requisition code closes odoo/odoo#29717 Signed-off-by:
Martin Trigaux (mat) <mat@odoo.com>
-
- Feb 14, 2019
-
-
Arnold Moyaux authored
Improve the procurement requests performance. Instead of processing procurement request one by one, search rules that apply for each of them and group them by rule's actions. The main technical change is the record creation order. E.g. 2 SO lines with pick ship delivery. -Before this commit: line1 -> LAUNCH_RULE -> PICK MOVE1 -> MOVE1 CONFIRM -> OUT MOVE1 line2 -> LAUNCH RULE -> PICK MOVE2 -> MOVE2 CONFIRM -> OUT MOVE2 -After this commit: line1/2 -> LAUNCH RULE -> PICK MOVE1/2 -> MOVE1/2 CONFIRM -> OUT MOVE1/2 Also there is one batch creation by company_id. It implies that values are group by company_id. Since company_id are passed by previous procurement or by the rule, it become a required value and it's added to the procurement arguments (it was already always passed in the values, no functional modification). _run_buy is reworked. It receives a bathc of procurements, those procurements could be merged in the same PO or the same PO lines. However the PO/PO lines are created (if procurement couldn't be merged in an existing one) at the end of the method. It implies that 2 procurements creating a PO and merged inside, would now create 2 distinct PO (same for po lines). _run_buy in order to fix this issue: - group procurements by PO search domain. If the PO doesn't exist, create only one. - Inside the same PO: merge quantities, move_dest_ids for procurements with the same product and UoM. Other _run_ methods are just adjusted in order to process batch. For a pick pack ship scenario, without procurment_jit confirm a SO containing 500 lines will take 40s instead of 15 minutes.
-
- Dec 21, 2018
-
-
Swapnesh Shah authored
closes odoo/odoo#29715
-
- Dec 07, 2018
-
-
William Henrotin authored
Before the fix we were requiring for product.supplierinfo.requisition_id which is a non existing field of the model 'product.supplierinfo'. I just change it then to purchase_requisition_id which is the required field. This triggered an error when you add a product selled by the defined vendor for an aggreement type defined as 'Blanket order'. opw-1914712 closes odoo/odoo#29342
-
- Nov 28, 2018
-
-
Prakash Prajapati authored
Usecase to reproduce: - Enable 'Managers must approve orders' - Set agreement type as 'exclusive' - Connect as purchase user - Create a requisition and an RFQ linked to it - Confirm the RFQ It raises a usererror that ask to close other PO linked to requisition. It happens because the purchase requisition code do not take care of double validation on PO. It will try to close the requisition once button_confirm is called. However it will only write 'to approve' on PO state and thus trigger the requistion error will be raise since all linked PO are not 'done' or 'cancel'. In order to fix it, the action_done on requisition should be call on button_approve instead of button_confirm. (button_approve is automatically called when double validation is not enable). Task: #1884410 Closes #28068 closes odoo/odoo#29049
-
- Nov 26, 2018
-
-
Nimesh Jethva authored
*: account, event, mrp, purchase_requisition, stock_landed_cost, stock_picking_batch Add activity on below models: account.payment event.event event.registration mrp.workorder purchase.requisition stock.landed.cost stock.picking.batch Related Task ID : 1867620 closes odoo/odoo#26092
-
- Nov 19, 2018
-
-
Jérome Maes authored
This commit simply move code into the right file. The goal is here to fit the guidelines and prepare the module for some changes. This will ease the reading of module code. Task-1851286 closes odoo/odoo#28795
-
- Jan 17, 2019
-
-
Haresh Shyara authored
The purpose of this commit is to make requisition usable with only services. Stock part is extracted in a new module `purchase_requisition_stock` which allows to create requisition based on product availbility or demand, also we have moved all security access related stock in this bridge module. Task ID : 1851286
-
- Jan 04, 2019
-
-
Thibault Delavallée authored
Purpose is to clean the use of tracking parameters on fields. Parameters are merged and is now tracking=<int> or tracking=True. This commit is linked to task ID 1903814 and PR #28430.
-
- Nov 13, 2018
-
-
Goffin Simon authored
Steps to reproduce the bug: - Create a product : stockable + purchase : propose a call for tenders + reordering rule (qty min 0, max 0, multiple 1) - Create a SO for that product. - Run the scheduler once : a requistion is generated (Purchases > Purchase > Purchase Agreements), which is normal behavior - Run the scheduler a second time Bug: A new requistion was generated for the same product, by the same reordering rule opw:1892950 closes odoo/odoo#28611
-
- Nov 05, 2018
-
-
Andreas Perhab authored
payment_term.id, creates a tuple wich works if payment_term.id is set in case payment_term.id is False this creates the tuple (False,) which is then converted by the Odoo ORM to a account.payment.term(False, ) record set, which in term may cause weird behaviour as this value does not eval to false in cases like `if self.payment_term_id:` Closes odoo/odoo#28397
-
- Oct 20, 2018
-
-
David Arnold authored
The subsequent code strongly suggests that pick_in can be None, however, the raise_if_not_found has not been set properly. closes odoo/odoo#27397
-
- Oct 24, 2018
-
-
Yenthe V.G authored
self may be several records Fixes odoo/odoo#28032 Closes odoo/odoo#28045
-
- Oct 16, 2018
-
-
Goffin Simon authored
When creating a "purchase.requisition" record, the default Operation Type was always the one defined in the company 1 even if the user was not in the company 1. opw:1890190 closes odoo/odoo#27830
-
- Oct 08, 2018
-
-
Goffin Simon authored
When creating a "purchase.requisition" record, the default Operation Type was always the one defined in the company 1 even if the user was not in the company 1. opw:1890190 closes odoo/odoo#27520
-
- Sep 27, 2018
-
-
Adrian Torres authored
This commit adapts the business code to changes introduced by the parent commit in order to keep the same behaviour as before. All readonly=False fields will have to be checked afterwards to confirm that the business case requires write access to the source field.
-
- Sep 21, 2018
-
-
Nimesh Jethva authored
Purpose of this commit is to give description more "business oriented" because those descriptions appears in Odoo Studio which is supposed to be used by end users, not only by developers. Related Task ID : 37311
-
Prakash Prajapati authored
Purpose: improve understanding of partner and product models as well as their daily use. This is done by improving tooltips and labels of some fields according to business logic. This commit is related to task ID 1880696 and closes PR #27133 . Thanks to @xmo-odoo for its in-depth review.
-
- Sep 06, 2018
-
-
Goffin Simon authored
…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
-
- Sep 05, 2018
-
-
William Henrotin authored
Purchase agreements create request for quotation with prefilled field. The issue is: date_planned (on RfQ) is filled from schedule_date (on PA). The first one is a datetime object. The second one is a date object. This commit makes a right conversion between datetime and date at the RfQ creation. This issue was introduced by the datetime refactoring (#24717) Task id: 1878136
-
- Aug 21, 2018
-
-
dat-odoo authored
Purchase orders created from purchase agreement behave differently depending on the agreement type. On one hand, if the agreement is a blanket order, the vendor must be set automatically on the purchase order and be the same as the BO. Changing the vendor is forbidden. On the other hand, if the agreement is a call for tender, multiple purchase order can be created with different vendors. It that case, the vendor field must be editable in RfQ states. This commit is related to task ID 1866975.
-
- Aug 06, 2018
-
-
Raphael Collet authored
From this commit onwards, Date fields will return datetime.date objects and Datetime fields will return datetime.datetime objects, this implies a number of things that are clearly explained both in the ORM API for master. This commit also introduces a number of helper functions for dates and datetimes that are exposed in tools.date_utils and fields.Date[time], explained in the documentation as well. Task-ID: 47189
-
- Aug 02, 2018
-
-
Martin Trigaux authored
-
- Jul 19, 2018
-
-
Darshil Trivedi authored
This commit is related to task ID 1852969.
-
- Jun 27, 2018
-
-
Goffin Simon authored
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: c914df5a opw:1860430
-
- Mar 22, 2018
-
-
Jaykishan Solanki authored
When creating the supplier info record from a blanket order, do pass the `currency_id` field. task 1814507
-
- Mar 06, 2018
-
-
Raphael Collet authored
-