I am using OpenERP report designer to alter the sales order report a bit.
Background:
I am trying to remove the internal reference of a product that appears in my invoices, sales orders and quotations....
Actions done:
I have created a new field through the delevoper mode and named it x_showintref which is a boolean ('x_showintref': fields.boolean('Show Internal Reference'))...
What to do:
I am trying to edit the sales - quotation report so that when the x_showintref is ticked, it will display the internal reference else it will not display the Internal Reference of the product.
Other Ideas:
Is there a way one can put this in a python script as well??
Many Thanks
Try this in your report. This will work.
[[ o.x_showintref==True and line.product_id.default_code or line.name ]]
Related
In FSCM I am looking to modify the Search view on Add/Update PO page (Main Menu--> Purchasing--> Purchase Orders--> Add/Update POs) to display the Requisition ID associated with the PO in the search results page. The only table I have found that has both PO_ID and REQ_ID is PS_PO_LINE_DISTRIB however unless I use a SELECT DISTINCT clause I will get multiple PO_ID rows when there are more than 1 line on a PO.
Within Purchase Order Inquiry you can see the related Requisition ID's related to a PO by clicking on Document Status link inside the Purchase Order inquiry details page.
I started looking at the PeopleCode within the the Purchase Order Inquiry to see how they are linking the PO to a Requisition and it appears to use work tables with related PeopleCode function libraries, but I wasn't able to figure our how they get linked. I am hoping someone else may know the answer to this. Thank you.
I'm on an old version of PeopleSoft (SCM 8.80, Tools 8.51), so your mileage may vary. I'm assuming you're familiar with App Designer. If not, comment below and I'll add some details about what I'm clicking on.
Find the name of the Add/Update PO component.
Open the PURCHASE_ORDER component in App Designer. Now let's find the name of the search record. Note that there is a different record for the Add Search Record, so if you want to change that too, do all of this for that record as well.
Open the PO_SRCH record, and add the REQ_ID field to it. Make sure you mark the field as a key. You should consider saving your modified PO_SRCH under a new name in case you want to be able to revert to vanilla PeopleSoft. If you do, change the Search Record in the component to your new record name.
We can see that PO_SRCH is a view. So let's modify the view to pull in REQ_ID from PO_LINE_DISTRIB. As you mentioned above, there doesn't appear to be another table with both PO_ID and REQ_ID, so you'll have to do a SELECT DISTINCT.
We should do a LEFT OUTER JOIN instead of a standard join because if you do a standard join and you enter a purchase order with no lines and save it, then you'll never be able to retrieve that purchase order in this window. Since REQ_ID is a key field, we can't have a null, so we have to do the CASE.
One odd thing that I ran into here was building the view now gave me an error about selecting fewer columns in the SQL than I had in my record definition. I solved it by modifying the view for SQL Server. I've never had to do that before and I don't know why I had to do it for this specific record. But anyway, I entered the same SQL under the record's "Microsoft SQL Server" definition.
In the properties of PO_SRCH, we can see that it has a related language record. If you're only using one language, you can probably get away without changing this, but I'll do it for completeness. Open PO_SRCHLN. Now add REQ_ID to it (mark it as a key field like you did above), and save it as PO_SRCHLN2 (I'm saving it under a new name so I don't break anything else that may be using PO_SRCHLN).
Edit the SQL the same was as you did above. Note: I didn't have to also change the Microsoft SQL Server definition like I did above. I have no idea why.
Now build PO_SRCHLN2.
Go back to PO_SRCH and change its related language record to PO_SRCHLN2.
Now build PO_SRCH.
Hopefully you didn't get any errors and your search page has the requisition ID in it now. My system doesn't use requisitions so they're all blank in the example below, but the new field is there.
First of all I'm kinda new to Odoo and I'm trying to understand some Basic logic. I created my own Report based on the Basic Report of Odoo.
There are a lot of fields like t-field="o.date_invoice" or t-field="o.partner_id etc. which work really fine but where can I find all functions? Is there any list?
For Example I Need a Field for the order date and for the print date or for a Customer ID.
With a t-field attribute you can access and print fields from the actual model or from a related model, for example with the following element you can print the content of the phone column (field) of the actual record:
<span t-if="o.phone"
t-field="o.phone" />
Explanation of t-field in the documentation:
The t-field directive can only be used when performing field access
(a.b) on a "smart" record (result of the browse method). It is able to
automatically format based on field type, and is integrated in the
website's rich text edition.
Check this link for further information if you want to build reports and this one, where you can read about some the elements that you can use in Qweb
In addition, you can check here a list of some attributes that you can use in a Qweb template
I've been trying to print labels in dynamics AX 2012 r2.
I'm following this link:
http://dynamicsaxtipoftheday.com/2014/04/30/generate-product-bar-code-labels-through-retail
Somehow when I get to the Product label report setup form, there is no reports in the report name dropdown.
See screencast: http://screencast.com/t/KVHAIKZ4cT
I have already deployed the RetailLabel report, (A4Landscape3X5_ItemReport and A4Portrait3X5_ShelfReport)
I have also installed the Retail Components.
Does anyone have an idea on how to get the report to show in the dropdown?
Thanks,
The lookup queries the system table UtilElements with the conditions name == 'RetailLabel*' and recordType == UtilElementType::OutputTool. Make sure the UtilElements table contains records for these conditions. The elements are output menu items called RetailLabelA4Landscape3x5_Item and RetailLabelA4Protrait3x5_Shelf. Also make sure that configuration key RetailHeadquarters is activated. I tested the lookup successfully on a AX 2012 R2 CU7 system.
I was able to fix this by modifying the query used in populating the dropdown list.
I know this is a common problem with various queries and I have been through this report several hundred times trying to fix it. When I attempt to preview the report titled, "RTK Report", I am prompted by Access for a value for "Inventory2013", the table containing the primary data for the report. This only happens, however, 1.) When I include a subreport titled, "Product Components Subreport" and 2.) Only after I've established the linking field, "ProductID", between the main report and the subreport. Link to sample database HERE.
The problem you are having appears to be cause by the fact you are linking a subform to your detail section with an ambiguous name of "ProductID". I got it to work by doing the following:
In the RecordSource for the main form, I changed the query SQL for column PropertyId to be "SELECT Inventory2013.PRODUCTID AS MainID,"
Since this will break the MASTER and CHILD links, I then modified the MASTER to be "MainID" and the CHILD to be "Product_ID"
After that change, the report runs and does not prompt you.
I know how to modify a 'physical' report with a defined name, and called from a button. But, in Axapta there are some reports called from the print button in the toolbar.
How can one modify a system report like 'sysreportauto'?
The fields shown in the auto report comes from the AutoReport field group on the table.
You can, as a user, change the auto report, by clicking Edit\New, then choose the fields you would like to see.
You can also specify group totals in Select\Sorting, and grand totals in Select\Print options.