could you help me? I need to show two totals, one with the system currency and another with the other currency that is handled, on the invoice.
1st: define two fields, one Float/Monetary and other for new currency(Many2one to res.currency).
2nd: use _convert method from odoo/addons/base/models/res_currency.py line 241, this method returns your desired amount converted in the new currency.
I hope this answer can help you.
Related
I need to allow Sales staff to add options in Quotes, and display a subtotal line under each option.
I'm thinking of using a couple of comment lines:
OPTHEAD (Sales will detail the option here, e.g., "Option 1: Full product line"
Sales Quote lines
SUBTOTAL
I'd like to replace the SUBTOTAL comment line when it is printed, with the total of lines between that and the Option Header. Along the lines of "Subtotal Option 1, $1000"
Could someone please provide me a pointer to achieve this? I'm having trouble finding guidance/documentation for this, but it must be a fairly common requirement.
The method you mention is one possibility, however might be difficult to manage.
I suggest you add a new field to the Sales Line table e.g. Sales Option of type Integer. The field would also need to be added to the Sales Quote subform page.
The salesperson then needs to assign a value to the Sales Option field in order to group the lines into options.
The Sales Option should be added to the report dataset for each line which will enable you to group on it on the RDLC layout.
You can then add a sum per group.
I have two columns, Type of asset and Total Amount Sale. I want to divide them into categories, high value and low value. The type of asset are PC240, PC250, PC400, PC500, PC1000.
If I were to set the minimum sale to the following. Please can someone help me how would I do it. Do I need to create another table to input this Minimum Sale?
Note: this minimum sale I got it from Excel file.
I need some help with trying to Totaling a column that is taking an average.
The column has an expression of: =avg(Fields!UOS_2017.Value)
I want to sum this column so I would think I could simply do: =sum(avg(Fields!UOS_2017.Value))
BUT this does not work. The total should be 3,606.
Here are my results
Here is my Design view
Update I am attached a sample of the data that is being used to create the report. Sample Data
Will anyone help me with the expression I should be using or help with a custom code. I appreciate any help.
Thank you in advance.
I'm assuming you have three row groups called something like
VP Rollup, Director Rollup and Cost Center
In this case you need to change your expression to be something like
=Sum(Avg(Fields!UOS_2017.Value, "Cost Center"))
This basically says "take the average at the cost center scope and then sum the results at the current scope (which would be at Director Rollup level).
I have an Access Database and i'm trying to create a report that has me a bit stumped. Basically this report is going to display each employee's order processing performance based on a user specified date range, the report gives an itemized detail of each unique product on the order and it's price and Quantity.
Each Product has an 'Assembly Category' either 'DRFLUSH' or 'FRAME'.
In the summary of each Order i want to total the Quantities of each Assembly Category in a separate field.
Initially i rushed this report and have now found that the way i intended on completing this task is incorrect as the value given is only a Count of how many times an instance of each value 'DRFLUSH' or 'FRAME' occurs. I started with as follows: (Please ignore the bad practice with field naming i have taken this database on from a previous employee).
=Count(IIf([ASSEMBLY ITEM CATEGORY]="FRAME",1,Null))
And
=Count(IIf([ASSEMBLY ITEM CATEGORY]="DRFLUSH",1,Null))
However as previously stated this is wrong. I want the fields to sum the Quantity of each line item but only where the criteria is matched.
Any help is greatly appreciated, i'm sure this is a ridiculously simple task however i just cannot seem to wrap my head around it today.
Thanks
Alex
Sorted this by changing the statements to as follows:
=Count(IIf([ASSEMBLY ITEM CATEGORY]="FRAME",[QTY],Null))
=Count(IIf([ASSEMBLY ITEM CATEGORY]="DRFLUSH",[QTY],Null))
Probably get shot for posting this again but last attempt was put on hold so sorry in advance. i am very new at this so apologies if its a simple answer;
I created a table with name of purchaser, items purchased, date of purchase and cost of purchase. From that i wanted to create a report that would show each purchasers name only once with a combined total cost of all purchases.
I created a query that did just that using only the purchasers name and the total cost of their purchases. I then created the report from that query.
The report shows each name once with a total cost of purchases which was great except for the query continually adds those total purchases without the ability to select a date range and likewise the report shows the same info.
When i add the purchased date to the query/report so i can filter between 2 date ranges it then shows each name "X" amount of times with a total for each purchase made which is not what i am looking for as this ends up with a long report.
Hope this makes more sense than my last attempt at this question. I am very new at this so a simple answer would be great.
Thanks in advance
You need to get two parameters for the query, say [Start] and [End].
You need to add the date column twice so that it can be compared to [Start] AND [End]
You need to add the date column (on both occasions) with a Total "Where"; this tells access that the column has no other purpose than to impact a WHERE-constraint on the base dataset.
If you run into trouble, take the SQL below, correct all names in it, paste it into the query's SQL view, and then see what the design view looks like!
SELECT table.customer, Sum(table.price) AS sum
FROM table
WHERE (((table.date)>=[Start]) AND ((table.date)<=[End]))
GROUP BY table.customer;