Commit Graph
420 Commits
Author SHA1 Message Date
anhe-odoo 9255d3d7d9 [FIX] purchase: corrects the order date on validated RFQ/PO pdf report
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

closes odoo/odoo#82267

X-original-commit: 91d0354
Signed-off-by: Arnold Moyaux <arm@odoo.com>
2022-01-05 12:50:20 +00:00
Adrien Widart 2cc6ca6dd2 [FIX] purchase: compute the average of the delays in report
When consulting the Purchase Analysis, the measure "Days to Confirm" may
not be easily understandable

To reproduce the issue:
1. Create a purchase order PO:
    - Order Deadline: <today + 10 days>
    - Add 2 products
2. Confirm PO
3. Purchase > Reporting:
    - Measures: Days to Confirm
    - Group By: Order

Error: For PO, the value of "Days to Confirm" is -20, it should be -10

The report computes the sum of the delay (i.e., "Days to Confirm") of
each purchase order line. Computing an average seems more relevant

A similar flow could be reproduce with the measure "Days to Receive"
(i.e., the difference between the Order Deadline and the Receipt Date)

OPW-2678673

closes odoo/odoo#81053

X-original-commit: da3fa1f8887e06e7a86e761ef844f79cc0d06e6f
Signed-off-by: Arnold Moyaux <arm@odoo.com>
Signed-off-by: Adrien Widart <awt@odoo.com>
2021-12-08 14:31:44 +00:00
oco-odoo d849333b33 [FIX] purchase, sale: display foreign VAT properly on pdf
When printing a sale order or a purchase order using a foreign VAT fiscal position, the domestic VAT was always used on the pdf report instead of the foreign one.

Part-of: odoo/odoo#79144
2021-10-28 14:37:43 +00:00
Tiffany Chang (tic) bc840e2431 [FIX] purchase: correct amounts for purchase report multi-company/currency
Selection of multiple companies to view multi-company data was added
in v13, but at the time there was no way to have reports correctly
take into account currency rates when also working with multi-currency.
v14 onwards is able to correctly apply the currency rates, therefore we
fix the purchase report to do so.

Steps to reproduce:
1. Start with existing demo data + add a new company with currency = EUR
2. Activate multi-currencies + set a currency rate (not 1) for Euro to $
3. Open Purchase Report (Purchase > Reporting > Dashboard)
4. Activate demo company + new EUR company
5. Switch between USD and EUR company as selected company

Expected result:
  Dashboard monetary quantities switch between $ and EUR, i.e. both the
  amount changes according to current exchange rate and symbol.

Actual result:
  Currency symbol changes, but amount stays the same.

closes odoo/odoo#79001

X-original-commit: 083a3776835b471dbbd6dedc44f233a6cf5d7cc8
Signed-off-by: Arnold Moyaux <arm@odoo.com>
Signed-off-by: Tiffany Chang <tic@odoo.com>
2021-10-26 13:23:20 +00:00
Mathieu Duckerts-Antoine 7545913020 [REF] *: graph archs cleaning
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
2021-09-07 15:50:14 +00:00
d1e227b07b [IMP] web,*: new PivotView component
Part-of: odoo/odoo#73311
Co-authored-by: Aaron Bohy <aab@odoo.com>
Co-authored-by: Bruno Boi <boi@odoo.com>
Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Co-authored-by: Julien Mougenot <jum@odoo.com>
Co-authored-by: Lucas Perais <lpe@odoo.com>
Co-authored-by: Jorge Pinna Puissant <jpp@odoo.com>
2021-09-07 10:04:38 +00:00
oco-odoo d9a3b938fe [IMP] account, sale, purchase, l10n_latam, l10n_ar: add the possibility to use subtotals above tax groups when displaying them
A new field on tax groups makes it now possible for this group to be displayed under a subtotal label. If not set, this defaults instead to "Untaxed Amount", keeping the traditional behavior. This is intended for withholding taxes, which can now be implemented with negative taxes and a tax group with this field set.

To do that, this commit entirely refactors the way amount_by_group worked, and replaces it with a more complete json field called tax_totals_json. It also streamlines the way taxe totals are displayed on invoices, PO and SO and makes it so that a common code is called instead of copy-pasting the same block 3 times as before.

[IMP] purchase: always display tax totals by groups on purchases orders

Before, tax totals on purchase.order's form were not shown by group, and were instead all aggregated in a single "Taxes" category. The same went for the pdf export. The portal view, though, did show the totals by group. We now display the tax groups in the same way all the time.

closes odoo/odoo#74138

Task: 2457374
Related: odoo/enterprise#19802
Related: odoo/upgrade#2670
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2021-09-02 14:15:13 +00:00
Anjali 7c5bfb42d4 [IMP] various: add list views for some important reporting models
Currently, there are many useful pivot views on reporting models but most
of them lacks the dedicated list view. Dedicated list views will allow users
to see useful information when one directly drill down to the records from
the pivot table in odoo spreadsheet [1].

With this commit

  1. we remove 'disabled_linking' attribute from the very important pivot
     and graph views (see the full list on task pad);
  2. we added dedicated list views for the following reporting models

    - account.invoice.report
    - fleet.vehicle.cost.report
    - hr.timesheet.attendance.report
    - purchase.report
    - project.profitability.report
    - report.membership
    - report.pos.order
    - report.project.task.user
    - sale.report

Task-2547881

[1] See task-2506116

closes odoo/odoo#72394

Related: odoo/enterprise#19122
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-07-29 09:33:56 +00:00
oco-odoo 17610e8ca9 [IMP] account, account_edi, l10n_*, purchase, sale: Generalize the use of account_fiscal_country_id
Before, account_fiscal_country_id was only use for tax operations; and country_id was used for all the other accounting stuff. Now, with the new ability to use foreign tax reports (with foreign VAT fiscal positions), we can generalize the fiscal country, sot that it is the one that needs to be used for the whole accounting. Since foreign tax reports were not supported before, account_fiscal_country_id is already set on existing database as the country for the "main" accounting, so the impact of this change is small.

closes odoo/odoo#68349

Related: odoo/upgrade#2322
Related: odoo/enterprise#17299
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2021-04-01 12:09:20 +00:00
Xavier Morel 707da2bba1 [FIX] purchase: avoid broken domains
Combining domains using `+` is not ideal as it's somewhat easy to
unwittingly create broken ones and perform unexpected
selections. Combining with `expression.AND` should be a lot more
reliable.

closes odoo/odoo#66160

X-original-commit: 696819972d5a51f826fb675f0cb712f819c2cdf4
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2021-02-15 11:50:26 +00:00
mir-odoo e9638fd3ae [IMP] crm,purchase: Improve the reporting menu
Pupose of the task is, to set up a dedicated 'dashboard' reporting menu
item, and make the graph view the default the other 'leads' and
'opportunities' reporting menus.

So in this commit, change the default view graph in normal report
(except dashbaord menu) and each menu should be submenu of reporting
menu Also apply default filter for lead reporting menu

TaskID: 2311392
Related Enterprise: https://github.com/odoo/enterprise/pull/12419

closes odoo/odoo#55598

Closes: #55598
Related: odoo/enterprise#12419
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-11-05 11:00:27 +00:00
svs-odoo ddbc10f8b1 [REM] purchase: remove unused import
closes odoo/odoo#61291

X-original-commit: d4d06b47c58b82a4757d56ffcdfc11a2d01b3ea1
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
2020-11-03 16:19:12 +00:00
JF Aubert c7debd2edb [IMP] stock : Improve general usability
Purchase
- When a RFQ is in "To Approve" stage, on the printed pdf, keep "Request for Quotation" as a title
- "Send Reminder" action should open the composer when triggered manually.

Inventory
- In tree view of transfer, set date_done optional = hide
- In (mobile) picking view, replace button text with 'add a product'
- fix Vendor Group by in Replenishment report
- Warning message when changing product tracking from untracked to tracked

MRP
- Reporting > Manufacturing Orders : change measure for total quantity grouped by scheduled date = month and by product
- Reporting > Work Orders : change measure for Duration per unit grouped by workcenter and by product & add unit (minutes)
- Reporting > Overall equipment effectiveness : group by loss reason added to the current group by workcenter

closes odoo/odoo#57036

Related: odoo/enterprise#12926
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
2020-10-08 09:10:51 +00:00
Mathieu Duckerts-Antoine e56a095f16 [FIX] *: disable linking on some graph views
For the graph views based on reporting models (e.g sale.report), click
on a group in the chart redirects the user to an "empty" list view. Here
we use the attribute disable_linking to avoid that redirection for those
views.

Task ID: 2336960

closes odoo/odoo#57622

X-original-commit: 0b0ae92b6bdac25843ba24d767dbcab3b75703e5
Related: odoo/enterprise#13192
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-09-14 10:01:49 +00:00
Barad Mahendra 30adc183f8 [IMP] *: set sample="1" on reporting view archs
The purpose of this commit is to enable sample data on various graph and
pivot views.

Task ID: 2319606

closes odoo/odoo#55917

Related: odoo/enterprise#12415
Signed-off-by: Mathieu Duckerts-Antoine <Polymorphe57@users.noreply.github.com>
2020-08-18 14:24:10 +00:00
Barad Mahendra 63f239163a [IMP] *: set sample="1" on various graph archs
The purpose of this commit is to enable sample data in various
graph views.

TaskID: 2311486
2020-08-12 09:57:09 +00:00
Xavier Morel 6835aeb0de [REM] core, *: deprecate <act_window> and <report>
Convert deprecated tags through the codebase.
2020-07-28 13:03:13 +00:00
Yannick Tivisse 893ec20236 [IMP] various: Add date filters on search views
PURPOSE
=======

The task aims at adding date filters across various modules in preparation
for the 'time range' feature rework on task 2245719

https://www.odoo.com/web#id=2245719&action=327&model=project.task&view_type=form&cids=1&menu_id=4720

SPECIFICATION
=============

New date filters to compensate the deprecated time ranges feature:

See task's pad for the complete details

closes odoo/odoo#52398

Taskid: 2263661
Related: odoo/enterprise#10938
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-06-09 10:50:17 +00:00
Raphael Collet 84a595301e [REF] expression: use and return a Query object
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.
2020-05-20 07:56:44 +00:00
Tiffany Chang (tic) 52dc25d428 [IMP] purchase(_stock): Add more reporting values
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
2020-03-31 10:31:35 +00:00
Laurent Stukkens (LTU) 38294dbc99 [IMP] purchase, purchase_requisition: improve UX
Several improvements in order to improve user interface are done here.

[IMP] purchase: Prevent create PO&RFQ in calendar
   It was possible to create PO's and RFQ's from the calendar view.
   The Product Owner wanted to prevent the users from doing so.

[IMP] purchase: Add tooltip to Receipt Date

[FIX] purchase: Align report & stat button data on product form
   The use of Last 365 days time_range in the purchase analysis was automatically
   excluding today's purchases wich was confusing users as the stat button info
   was taking those into account.

   Different behaviours were implemented for product template and product product
   in the filters that were used which makes no sense.

   Use of context_today() instead of datetime.now() in order to take the user's
   timezone into account.

[IMP] purchase: Use relevant dates for RFQ's and PO's in calendar view
   The date used in order to display RFQs and POs in the calendar was date_planned
   which is not mandatory and so not always filled. It has been decided to use the
   order_date for the RFQ's and date_approve for PO's.

[IMP] purchase_requisition: Making Agreement selection type more explicit

[IMP] purchase: Show UOM menu only if installed

[IMP] purchase: Add product variant in settings

[IMP] purchase: Remove Favorites predefined filters

[IMP] purchase: Rephrase PO action helper

[IMP] purchase: Allow open/edit Agreement Type

[IMP] purchase: Rephrase RFQ action helper

[IMP] purchase: Remove PO's and RFQ's name from fields in calendar
   The Product Owner originally wanted to have a link on the PO name field
   that was shown in the calendat popover. As the Edit button already allows
   to edit the PO's or RFQ's from the popover it was decided to simply remove
   the field (as it was already displayed at the top of the popover)

[IMP] purchase: Open the right view when click on Reporting top menu

Task ID #2196688
Closes #47810

Related: odoo/enterprise#9294
Related: odoo/upgrade#961
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-03-31 08:08:22 +00:00
Ankita Raval d675dbaa4c [IMP] account,* : Change type field to move_type in account.move
task-id: 2028z813
2020-02-19 09:09:20 +00:00
Goffin Simon 5a3c4f0742 [FIX] purchase: Purchase report filter
The filter for Purchase orders in the Purchase report did not filter out Sent RFQ,
despite the fact that they were not really ordered yet.

opw:2158248

closes odoo/odoo#44892

X-original-commit: 201cfb46462590bb2460bc76317e37742c789fae
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2020-02-07 15:47:03 +00:00
david eec9c4aac5 [IMP] purchase: add names to columns and divs for better inheritance
Closes odoo/odoo#37814

closes odoo/odoo#43751

X-original-commit: 47f2534ddbdc717644673d6f68576ca027b0374a
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-01-22 12:21:36 +00:00
Goffin Simon 3ba8231733 [FIX] purchase: Purchase report wrong qty_to_be_billed
Steps to reproduce the bug:
- Let's consider product P with purchase_method = 'purchase'
- Create a purchase order PO and puchase 20 units of P to a vendor
- Confirm PO and create a vendor bill VB the 20 units of P
- Validate VB
- The invoiced quantity on PO is 20
- Go to the Purchase report and analyse the qty_to_be_billed

Bug:

The qty_to_be_billed was still equal to 20 instead of 0

opw:2091264

closes odoo/odoo#39493

X-original-commit: b00febedef7826f593bb07c7896595ecce8cae32
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2019-10-29 10:08:49 +00:00
Christophe Simonis 886eca0131 [IMP] *: remove usage of oldname attribute
This attribute is misleading as it is insufficient to correctly upgrade
the database. It only renames the column in the database, but other
operations are needed, like updating the corresponding `ir.model.fields`
record (and its xmlid). The default values and the translations are also
lost during the upgrade.

Moreover, this feature was misused. It was:
 - left on fields during multiple versions.
 - used on reports (SQL views). This would be ok if the feature was
   complete, but, as is, it was useless.
 - kept unchanged after a second renaming of the field (which can happen
   versions later the first rename).
 - used, even when the meaning of the field changed. i.e. the field
   `archived` has been renamed to the classic `active`, but the value
   in the database should be switched.
2019-08-05 09:36:41 +00:00
Ravi Gadhia 561829849f [IMP] purchase: add section and note on order line 2019-07-16 08:18:55 +00:00
Raphael Collet c552fb7a61 [IMP] api: remove deprecated decorators 2019-07-08 13:51:35 +00:00
Laurent Smet bc131c0cfb [MERGE] manual forward port of accounting-pocalypse (beaa30a3d1)
This commit merges the following models
 * account.invoice and account.move
 * account.invoice.line and account.move.line
 * account.voucher and account.move
 * account.voucher.line and account.move.line

It was the opportunity for a big cleanup of the code, so it also restructures the whole account module, its different models/fields, the tests etc. for a better world and a better code readability.

==== Rationale ====
The rationale of this huge change is that we want journal entries / invoices to be easily edited, and changes reflected in the other model. It's a HUGE feature and very strategic for the fiduciary companies. For example, changing the account of a journal entry needs to be automatically reflected on the related invoice.

The same reasoning applies to sale/purchase vouchers.

==== Changes made in features =====
When creating an invoice, you are now creating a journal entry directly.
--> The object account.invoice no longer exists.
In the same fashion when creating an invoice line, you're now adding journal items directly in the journal entry representing the invoice. If this invoice line has some tax, it may create additional journal items as well.
--> The models account.invoice.line & account.invoice.tax no longer exist

Identically, when creating a sale/purchase receipt with its lines, you are now creating a journal entry directly and there's no more usability difference between encoding a receipt or an invoice.
--> The object account.voucher no longer exists.
--> The object account.voucher.line no longer exists.
--> The whole account_voucher module no longer exists.

Positive side-effects coming from these changes are
* draft invoices/bills/sale or purchase receipts now create a draft accounting entry. Validate these objects now simply post its journal entry. That means that draft invoices/bills/sale or purchase receipt can straightforwardly be included in reporting or budgets.
* opening a journal entry in form view will now always open the correct view: if it's a sale/purchase journal entry we will have a customer invoice/vendor bill view or a sale/purchase receipt view, whatever the menu we're coming from.
* code & business logic simplification. It is also condensed in a single place instead of being partially duplicated on invoices, vouchers and journal entries.

There should be no feature loss, except the one allowing to group multiple journal items together based on the same product during the invoice validation.

==== Changes made in models =====
* account.invoice: model removed. Instead, now use account.move with following mapping

field (account.invoice) 		field (account.move)
-----------------------			--------------------
name 					invoice_payment_ref
number 					name
reference 				ref
comment 				narration
user_id 				invoice_user_id
amount_					total_company_signed amount_total_signed
residual 				amount_residual
state 					state + invoice_payment_state 		/!\ selection changed
date_invoice 				invoice_date
date_due 				invoice_date_due
sent 					invoice_sent
origin 					invoice_origin
payment_term_id 			invoice_payment_term_id
partner_bank_id 			invoice_partner_bank_id
incoterm_id 				invoice_incoterm_id
vendor_bill_id 				invoice_vendor_bill_id
source_email 				invoice_source_email
vendor_display_name 			invoice_vendor_display_name
invoice_icon 				invoice_vendor_icon
cash_rounding_id 			invoice_cash_rounding_id
sequence_number_next 			invoice_sequence_number_next
sequence_number_next_prefix 		invoice_sequence_number_next_prefix

'invoices' subset of account.move can be accessed by using the selection field 'type' or one of the many helpers like is_invoice()

* account.move: now has a valid state 'cancel' that has to be excluded from all business logic
* account.move: field 'amount' renamed into 'amount_total'
* account.move: field 'reverse_entry_id' renamed into 'reversed_entry_id'
* account.move.line: now has a field 'display_type' that has to be excluded from all business logic, in order to support invoice layouting
* account.invoice.line: model removed. Instead, now use account.move.line with following mapping

field (account.invoice.line) 		field (account.move.line)
----------------------------		-------------------------
invoice_id 				move_id
uom_id 					product_uom_id
invoice_line_tax_ids 			tax_ids
account_analytic_id 			analytic_account_id

'invoice lines' subset of all account.move.line from a journal entry can be accessed by using the boolean field 'exclude_from_invoice_tab'

* account.invoice.tax: model removed. Instead, now use account.move.line with following mapping

field (account.invoice.tax) 		field (account.move.line)
---------------------------		-------------------------
invoice_id 				move_id
account_analytic_id 			analytic_account_id
amount 					price_unit
base 					tax_base_amount

'tax lines' subset of all account.move.line from a journal entry can be accessed by using the relational field 'tax_line_id'

* account.invoice.confirm: model removed. Instead, now use the 'post()' function of account.move
* account.invoice.refund: model removed. Instead, now use account.move.reversal to reverse the entries with the same options as we had for invoices
* account.voucher: model removed. Instead, now use account.move of type in ['out_receipt', 'in_receipt]
* account.voucher.line: model removed. Instead, now use account.move.line

==== Changes made in functions ====
* on account.move, method _run_post_draft_to_post() renamed into _autopost_draft_entries()
* on account.move, method action_account_invoice_payment() renamed into action_invoice_register_payment()
* on account.move, method action_invoice_reconcile_to_check() renamed into action_open_matching_suspense_moves()
* on account.move, method _get_domain_edition_mode_available() renamed into _get_domain_matching_supsense_moves()
* on account.move, method _get_intrastat_country_id() renamed into _get_invoice_intrastat_country_id()
* on account.move.line, method _get_domain_for_edition_mode() renamed into _get_suspense_moves_domain()
* in account.bank.statement, contextual key 'edition_mode' renamed into 'suspense_moves_mode'

Was task 1917430
2019-07-01 13:45:57 +02:00
Hiral Bhavsar 3cd7ed07a2 [IMP] *: remove 'view_type' on window actions.
The old tree views don't really exist anymore, this odd pseudo-flag to
dispatch between "list" and "tree" tree views has no reason to remain.

Task 1937686

closes odoo/odoo#31243

Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2019-06-17 11:34:17 +00:00
Hetashree Chauhan b5cea7e2b6 [IMP] purchase: purchase report improvement
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.

closes odoo/odoo#28248

Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2019-05-31 09:06:30 +00:00
Christophe Simonis a97037c6d4 [MERGE] forward port branch saas-12.2 up to 78b3b650b0 2019-05-06 12:27:51 +02:00
Denis Ledoux b11930047f [MERGE] forward port branch 12.0 up to c9913152ec 2019-04-26 18:14:18 +02:00
Lucas Perais (lpe) b130b35f04 [FIX] purchase: locked purchase orders are billable
Before this commit, when the PO was locked:
- the button create bill did not appear on the form view
- on the invoice form view, the field autocomplete did not mention the PO

After this commit, the button create bill is present, and the PO appears in
the auto-complete field of the Vendor bill

OPW 1970537

closes odoo/odoo#32794

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2019-04-18 10:57:39 +00:00
Christophe Simonis c50d7d6bc5 [MERGE] forward port branch 12.0 up to 82c4393fd0 2019-03-19 15:14:23 +01:00
Christophe Simonis ff1bca32f3 [MERGE] forward port branch 12.0 up to a26496b6e7 2019-03-14 17:43:32 +01:00
Christophe Simonis 9a4e84ae66 [MERGE] forward port branch saas-11.3 up to f5ab04ce50 2019-03-14 14:13:47 +01:00
Christophe Simonis afe8e97800 [MERGE] forward port branch 11.0 up to c23d1186e7 2019-03-13 16:52:40 +01:00
Nicolas Martinelli 547e6e37f4 [FIX] purchase: canceled bill in suggestion
- Install `account_cancel`
- Create a vendor bill for Partner A, cancel it
- Create a new vendor bill for A

The 'Auto-Complete' suggest a bill with an empty name, and only an
amount. It corresponds to the canceled bill.

On a canceled bill, the `number` field is empty, and consequently the
`name` is empty as well.

Whatever is the state of the bill, displaying a bill is useless is only
the amount is shown. Therefore, we make sure to only display the bills
with a number set.

opw-1950846

closes odoo/odoo#31863

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-03-15 09:32:34 +00:00
Rishabh Jadia ac45703e27 [IMP] purchase: improve the purchase order report.
The purpose of this commit is, remove "our order reference" because it is already in the title, replace purchase order confirmation by purchase order and add the purchase representative.

Task Id #1902886

closes odoo/odoo#31099

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-02-21 09:45:56 +00:00
Enric Tobella c16d2827bc [FIX] context on reports
closes odoo/odoo#31150

Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2019-02-15 12:58:38 +00:00
Christophe Simonis 79f1ecd756 [MERGE] forward port branch 11.0 up to d82c0d133e 2019-01-02 15:37:01 +01:00
Lucas Perais (lpe) d3e84f80f4 [FIX] purchase: prevent div by zero in purchase.report
Spinoff of 6cd12694d8

OPW 1916964

closes odoo/odoo#29828
2018-12-31 08:47:16 +00:00
Christophe Simonis a337b9ec92 [MERGE] forward port branch 12.0 up to f854e01a98 2019-01-18 14:26:33 +01:00
Nicolas Martinelli 3ad5748cef [FIX] purchase: auto-complete order
When using the 'Auto-Complete' feature of a vendor bill, oldest vendor
bills are suggested first.

This is because the `_order` uses the `vendor_bill_id` and the
`purchase_order_id`. In the view, we have a mix of positive, negative
and null ids, therefore this can't work.

We sort on the date and the name instead, which gives a more reliable
result.

opw-1925910

closes odoo/odoo#30299
2019-01-17 09:41:41 +00:00
Christophe Simonis 8aa8548d8a [MERGE] forward port branch 12.0 up to 3e4138deaa
closes odoo/odoo#30045
2019-01-09 15:56:53 +00:00
Christophe Simonis ec9400821e [MERGE] forward port branch saas-11.3 up to 27a084eb81 2019-01-04 14:54:08 +01:00
Christophe Simonis f351dd8cab [MERGE] forward port branch 12.0 up to 047e2b28de 2018-12-12 11:38:25 +01:00
Sébastien Theys dc4a9d3db7 [FIX] account,purchase,repair,sale,web: fix report layouts
Following BS4 migration and adding sections and notes.

=====

Document templates:

- Remove margin from <p> in "informations" to allow them to be
	correctly centered vertically on their container.

- Also add a mt- and mb- on their <div> to better handle them going to a new
	line when there are too many of them.

- Add class for section and note to be able to customize them in layouts.

- Add class for price_total to be able to customize it in layouts instead
	of relying on :last-child.

- Add "page-break-inside: avoid;" on the "total" table to not split it
	between pages when it can be avoided.

- Fix sale report template "Informations" to use col-auto just like invoice
	See 6b8d7bb6d6

=====

Boxed layout:
	- fix section & note style
	- fix borders in general
	- fix the total table

Background layout:
	- fix section style
	- fix the total table

Clean layout:
	- fix page number vertical align

task-1889346

closes odoo/odoo#27782
2018-12-03 13:16:52 +00:00
Andrea Ulliana 4a350ff8cc [IMP] product: clean forms and improve archiving
Several last cleaning in the product and product variant form :
- various labelling and design improvements
- sales, purchased and manufactured stat button (number of sales was
incorrect and click will now open normal sales analysis)
- now archiving related product.template if there is only one active product.product

Task-1880039  closes #28633
2018-12-06 14:27:14 +00:00