The traceback arises when a user tries to print 'Request for Qutation'
in 'purchase order' after providing 'Incoterm Location' and 'incoterm' value.
To reproduce this issue:
1) Install 'purchase_stock'
2) Open any existing purchase order
3) Click on 'Other Information' and give any value for 'Purchase Location'
4) Select any 'Incoterm'
5) Now print 'Request for Qutation' template
Error:-''purchase.order' object has no attribute 'invoice_incoterm_id''
On 'purchase_report_template' instead of 'incoterm_id', 'invoice_incoterm_id'
is used.
See:-
https://github.com/odoo/odoo/blob/158f8090ef30065b97ebe8b15b0bf73fff6a9ac4/addons/purchase_stock/report/purchase_report_templates.xml#L43-L48
In 'Purchase_order' there is no attribute of name 'invoice_incoterm_id'.
When the user tries to print 'request for Qutaion' and because of
'invoice_incoterm_id' is used, which leads to above traceback.
sentry-4379690422
closesodoo/odoo#132080
X-original-commit: c1daf78d1aa4252bf0f85cd704df0e929062f496
Signed-off-by: Tiffany Chang (tic) <tic@odoo.com>
Before this PR, the incoterm location was not present in the account module.
This pr does multiple things:
- Add the Incoterm Location field in Accounting on Customer Invoices and Vendor
Bills. The field already exists on Sale Orders and Purchase Orders. When you
create an Invoice from a Sales Order, or a Vendor Bill from a PO, copy the value
of the field on the invoices.
- Update the PDF to display the field value if present, and remove the useless
duplication
- Remove incoterm setting on sale
- Remove useless xpath since now it is displayed directly on invoice when
incoterm field is fill.
Task-id: 3273460
Part-of: odoo/odoo#118954
The new backend version of read_group can simplify the
current overrides of read_group. Do it for each of them and
avoid making extra search (done with __domain) when it is possible.
Part-of: odoo/odoo#110737
Refactoring of report_stock_forecasted to owl
Since it wasn't really a report (no print action),
it changed from a report to a client action.
Task: 2885757
See Upgrade : odoo/upgrade#3926
See Enterprise : odoo/enterprise#32116closesodoo/odoo#101247
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
The vendor delay report only works with basic use cases. Here are
the issues:
- For each SM, we sum up the done qty of all SMLs without
considering the UoMs
- When grouping several lines (for instance, by partner and product),
we sum up the quantities of each line but their UoM can be different
- When grouping several lines, we sum the `qty_total` which are the
quantity of the related POL. This is an issue: suppose a POL with
a quantity Q and suppose there are two SM (backorder), if we group
by product, we will have a total quantity of 2Q, which is
incorrect (and so will be the delivery rate)
To reproduce the issues: See the tests added by this commit.
Note: the last test (`test_vendor_delay_report_without_backorder`)
was not failing before this commit. It is added to simply improve
the tests
OPW-3065065
closesodoo/odoo#109471
X-original-commit: c2e351534b9627b6844effba9943b09d4b0b93f3
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
Signed-off-by: Adrien Widart <awt@odoo.com>
Reading only 'id' with `search_read` is equivalent to use `search` but
complexify the result usage. Fix all these bad usages.
Part-of: odoo/odoo#104838
Co-authored-by: Julien Castiaux <juc@odoo.com>
Minor UX updates to forecast report:
- add missing space (between # and unit + before |) also removed
superfluous uoms (only need it at the end now that an equation is
displayed)
- move On Hand Value to under product link (+ variants if they exist)
and make it a link to the valuation report of the product(s) in
question
- add link from Quantity on Hand to the locations (i.e. inventory/quants)
report for the relevant product(s). Note that product template was
added to Search in order to support default searching due to
forecasting report structure
- redo the top right forecast values to be On Hand + Incoming - Outgoing
= Forecasted so we provide more explicit and transparent values.
Additionally, these values are made to not display decimal digits if
all of those digits are 0. Note that forecasted values in table are
untouched (i.e. Forecasted Inventory = Forecasted is unchanged and
Forecasted with Pending still shows in table)
Also did some t-esc => t-out replacement and other small cleanup since
templates were already being edited.
"forecasted report" part of b2b task: 2882539
Part-of: odoo/odoo#97109
When a PO is in the "To Approve" state, it disappears from the
forecasted report
To reproduce the issue:
1. In Settings, enable "Purchase Order Approval" with a minimum amount
equal to 0
2. Create a storable product P
3. With Marc Demo:
- Create a PO with 50 x P
- Consult the forecasted report of P: there are 50 x P "Forecasted +
Pending"
- Confirm the PO (its state becomes "To Approve")
- Consult the forecasted report of P
Error: The 50 x P disappeared: 0 On Hand, 0 Forecasted, 0 Forecasted +
Pending. We should still see 50 Forecasted + Pending
OPW-2774586
closesodoo/odoo#86476
X-original-commit: c66fc2f3bfd069642fc9ed61ff322a136974a65c
Signed-off-by: Arnold Moyaux <arm@odoo.com>
Signed-off-by: Adrien Widart <awt@odoo.com>
To reproduce the issue:
1. In Settings, enable "Units of Measure"
2. Create a product P:
- Type: Storable
- Unit of Measure: Units
- Purchase UoM: Dozens
3. Create a PO with 1 (Dozens) x P
4. Open the Forecasted Report of P
Error: The value of "Requests for quotation" is 144, it should be 12.
The quantity has been converted twice.
OPW-2744195
closesodoo/odoo#84091
X-original-commit: 524a1c597fd409a488bb6af37aca8248727691c1
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Adrien Widart <awt@odoo.com>
Expected behaviour
The order date on the Purchase Order report (printable pdf) should be the
confirmation date if available and the order deadline else.
Observed Behaviour
The order date on the PO pdf is the order deadline of the RFQ, no matter
if the oder has been confirmed or not.
Reproducibility
This issue can be reproduced following these steps:
1. Create a new RFQ
2. Set an order deadline different from the current day
3. Confirm the RFQ
4. Download the printable PDF (as pdf) and check the Order date
Related ticket
- opw-2696794
closesodoo/odoo#82267
X-original-commit: 91d0354
Signed-off-by: Arnold Moyaux <arm@odoo.com>
*: mrp_subcontracting_purchase,payment,purchase_(stock)
BEFORE THIS COMMIT
fa-shopping-cart was used for different purchase-related contexts.
This icon should only be used for online shopping / ecommerce.
AFTER THIS COMMIT
Wa make sure one icon is used for one concept.
- fa-shopping-cart : ecommerce / add to cart
- fa-credit-card : purchases
- fa-credit-card-alt : replaces other uses of fa-credit-card
- fa-pencil-square-o : quotations in marketing modules
Icons are updated accordingly. Other icons are also changed to
increase readablity.
--- Links ---
Task Id - 2593306
COM PR - odoo/odoo#75694
ENT PR - odoo/enterprise#20478
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
We clean various graph archs taking into consideration that:
- the default type of a graph is "bar".
- a bar chart is by default stacked.
- the field attributes type="row" and type="col" does not make sense for
a graph view (since its implementation was separated from the pivot
implementation a long time ago))
- the boolean attributes should now take 1 or 0 as value (but the other
values are accepted for retrocompatibility).
Part-of: odoo/odoo#76065
Step to reproduce
- Purchase >> reporting
- Filters > choose a Vendor
- Filters > Effective Date Last Year
- Toggle Studio
- Add Pivot View and close
- Measures > On-Time Delivery Rate
Got a traceback, the read_group method didn't take into account
the aggregate functions.
opw-2600230
closesodoo/odoo#74672
X-original-commit: ca3821aa35bece74a461a47ea8a8f5e680df83a7
Signed-off-by: Anh Thao PHAM <kitan191@users.noreply.github.com>
Signed-off-by: guva-odoo <guva-odoo@users.noreply.github.com>
Replenishment is great to replace MTO but misses the direct link between SO and PO (smart buttons on both SO and PO to link to the corresponding PO and SO).
The info is actually there in the forecasted report but it is not accessible directly from the PO and in the case of the SO does not highlight the corresponding line of the SO.
This adds a graph icon in the PO, MO and receipt form to directly access the forecasted report (it already exists for SO and delivery).
The information linked to the SO/PO/MO/receipt/delivery is also sent to the forecasted report to highlight the corresponding line.
Note that in the case of the SO, the information needs to go first through the qty_at_date widget (which contains the link to the forecast report).
The graph icon for the PO, receipts and MO turns red when the forecasted quantity at expected date is negative. This is done using the new 'forecasted_issue' field.
closesodoo/odoo#62264
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
see and set priority on sales orders and manufacturing orders in forecasted report
without having to go to the SO/MO
add the priority star icon in front of the SO/MO reference
changing priority should reload the page with reordered SO's/Mo
add a unreserve button next to 'reserved from stock' in the replenishment column
add total order and customer amount in used by column
remove time in delivery/receipt dates
change column headers (Quantity -> the UoM of the product, Expected Receipt -> Receipt, Expected Delivery -> Delivery)
change 'Draft SO' -> 'Quotations' and 'Draft PO' -> 'Requests for quotation' and add links
mobile view: display KPI's on new line
check decimals on quantities, must be 2
closesodoo/odoo#60578
Task: 2349142
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
Disable the link on the vendor delay report graph view, as it leads us
to a undesired list view.
Task 2346121
closesodoo/odoo#59410
X-original-commit: 29e7e70e9452f354247f98412d925d1f17e5f86b
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
Previously, when compute on-time delivery, we compare the date_planned
on PO line with the date on stock.move. Since they are both datetime,
the product that delivered on the scheduled date may be considered delay
because of the 'time' part is late, which is normally not what we want.
In this commit, we only compare the date part of them to decide whether
it's late or not.
Task 2346121
PR #58653closesodoo/odoo#59386
X-original-commit: 86af7c647fe56f776c6cebc22dd5856577878980
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
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>
Some change to imporve reminder mail usability:
1. Scheduled date on POL of the PO form now is always editable.
2. Improve tooltip for the reminder email
3. don't show number of days when reminder email not checked on
both PO and partner form.
4. only show "confirm receipt date" button in debug model
5. In the mail, format date by partner.lang
6. Add button to send preview reminder mail
7. On default, receipt_reminder_email on res.partner is False
8. merge expected_date with date_planned (done by FP)
Task 2265912
PR #52693
1. automatically send a reminder mail to vendor to confirm the receipt
date. If confirmed, (confirmed by vendor) will be added next to the
receipt date. If not, vendor can update the date on the portal website.
An warning activity will be set for the purchase representative for this
update.
2. Vendor can also comfirm recieption of the PO when we 'send PO by mail'.
If confirm, (confirmed by vendor) will be added next to the confirmation
date. An filter is added in the PO search view to show all unconfirmed
PO.
Task 2230811
PR #49921
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
Add on-time delivery rate to vendor. When editing a PO, user can see
the overall on-time delivery rate during the last 365 days next to the
vendor. When click it, user will be redirect to a graph view showing
the detail of the on-time delivery rate of this vendor. Also add a stat
button to show the on-time delivery rate on partner form.
Task: 2230811
PR: #49921
The management of the join contexts now relies on the `Query` object,
that has all the necessary logic to do so. The refactoring also removes
the class `ExtendedLeaf`, which is no longer necessary: the join
contexts are all managed by a single `Query` object, and the parsing
stack now only contains triples like (leaf, model, table_alias).
Also inline directly the SQL translation made in `_to_sql`, which
overall simplifies the management of SQL parameters in the domain
compilation. The algorithm is illustrated in the code itself.
Added new values "Average Days to Purchase" and "Average Receipt Delay" to be
used in purchase enterprise reporting tab where:
Days to Purchase = confirmation date (i.e. 'date_approved') - creation date
Receipt Delay: effective Date - ('date_planned' or 'expected_date' if
no 'date_planned)
Note that these 2 new values are specific to purchase orders only.
Because of this the standard query result cannot be used since it is
done at the purchase order line level. This means duplication of PO
values occur and results in incorrect aggregation calculations. A hack was
done to ensure that these value will aggregated correctly when used at the
enterprise level. Therefore these 2 new values should only be used in
aggregate.
To support these new measures the following updates were also done:
- Addition/improvement of help descriptions for other date related
measures to avoid confusion
- Change state string to "Status" to match purchase.order (for
consistent filtering purposes)
This commit supports "Adapt Reporting" subsection of Purchase KPIs task.
Upgrade PR: odoo/upgrade#877
Enterprise PR: odoo/enterprise#8945
Task: 2198420
Purpose of this commit is to update incoterms list
base on new incoterms guidlines and add incoterms in RFQ/PO
and invoices/venderbills reports
task-2179236
closesodoo/odoo#43883
Related: odoo/upgrade#922
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Modify purchase report in order to make it consistent with
sales report.
For the RFQ it will show the Order Date and for the Purchase order
menu it will display the Confirmation Date.
Also rewrite a bit the SQL view in order to compute every purchase
order in the company currency.
Technicaly rewrite the SQL alias in order to have a report more
readable in the future.
Task ID : 1857130.
closesodoo/odoo#28248
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
When there are multiple warehouses, the shipping address must appear on
the purchase order and the RFQ.
opw-1955874
closesodoo/odoo#32230
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
We are adding a new report available on products that displays all the
routes applicable on the products and dislay them as arrows between the
different locations.
We also display the putaway rules and reordering rules on locations
where they are applied.
TASK-46972
This is needed because some reports we want to add later on, need to have
the address field on the left or following a given format.
Hence we moved the address div from each existing report on to the main report
template itself, Since some reports uses up until 3 addresses, we have defined
an area for the main address that each report can set (address used on the
envelope's window for sending). The any other extra address, or additional
information should be defined in the 'information_block' div
Was part of task: 35289
Was part of PR #25472
We want to break the dependency between stock and purchase
for our furtur developpement. For more modularity, a new
bridge module 'purchase_stock' is created.
This commti move part of business code, views, data, ...
related to stock management from purchase into purchase_stock
without changing any feature.
Task #47927