I need to add company currency symbol in kanban view.
<field name="company_currency_id" invisible="0" />
<field name="total_earnings" attrs="{'invisible':[('type_dashboard','!=','Total Earnings')]}" widget="monetary" options="{'currency_field': 'company_currency_id'}"
pls help
In your case basically currency_id it always part of company related field.
which is always part of company.currency model
first added that field in your kanban view file and make it as invisible
and that added your price field name using widget attribute.
<field name="currency_id" invisible="1" />
<field name="amount_total" nolabel="1" widget="monetary" options="{'currency_field': 'currency_id'}"/>
hear you can easily got the currency field after and before of field as per you are defined in your currency direction configuration for each currency.
amount_total is our price field we will get easily that field with currency configuration.
I hope my answer may helpful for you :)
Related
I'm trying to change field label/string on amount_by_group field that is showing total tax amount on Invoice form.
Tried to do it like this - using field attributes
<xpath expr="//field[#name='amount_by_group']" position="attributes">
<attribute name="string">Porez</attribute>
</xpath>
No luck, also tried to replace field with the same field but with string defined
<xpath expr="//field[#name='amount_by_group']" position="replace">
<field name="amount_by_group" widget="tax-group-custom-field" nolabel="1" colspan="2" attrs="{'invisible': [('amount_tax', '=', 0)]}" string="Tax"/>
</xpath>
I used methods described here (first two points in answer by Cybrosys) https://www.odoo.com/forum/help-1/change-field-label-through-python-149963
Does anybody have clue how to change that fields name? At the moment field label is "Neoporezivo" and I'd like to show it as "Porez".
What you tried is correct. It seems in your case, you have to update field translation.
When we load a new language, Odoo translates terms based on .po file given the folder i18n in the related module.
You can try first from the front end and if it works, you can override .po file.
Try this:
Active developer mode.
Go to Settings > Translations > Translated Terms
Find your displayed term and edit it with your desired term.
Refresh your page and check your form. It should update with the desired term.
EDIT:
In TFS there is possibility to link work items between each other - for example PBIs to Features, or Impediments. Does anybody know - how to make these links mandatory, so for example it will be not possible to save PBI if it was not linked to feature?
I'm using TFS2015 on premises.
According to the request, you need to set the Required rule for the links control, but as far as I know the default Links control not support Required rule.
So, as workaround you can add a hidden field, then set 'Required' rule for the hidden field, thus it will prompt that you need to link to Features or other workitems when you save the PBI without any linked workitems.
Here is the example. You could add field called Links, which is hidden field and it would have the following syntax:
<FIELD name="Links" refname="lc.RelatedWorkItems" type="Integer">
<WHEN field="System.RelatedLinkCount" value="0">
<REQUIRED />
</WHEN>
<WHENNOT value="0" field="System.RelatedLinkCount">
<DEFAULT from="field" field="System.RelatedLinkCount" />
</WHENNOT>
<HELPTEXT>This is a hidden/internal field that will help to force the user to associate the work items.</HELPTEXT>
</FIELD>
Is it possible to restrict users from editing a field in TFS based on a user? For example suppose there is a state field and owner field. The user selected in the owner field should only be allowed to updated the state field, it should be readonly to rest of the users.
You can define a rule of a field to achieve it.
Just edit the process template and make the field only editable by Admins. (You may need to install the power tools or use witexport and a good XML editor to do all the work)
<FIELD refname="System.Description" name="Description" type="PlainText">
<READONLY for="[Project]\Contributors" not="[Project]\Project Collection Administrators" />
</FIELD>
More info from MSDN: Apply a rule to a work item field
Restrict modification of a field to a group of users:
Use not to exclude a group from a rule. This example defines the Triage Description field as read-only for everyone except those users in the Triage Committee group.
<FIELD name="Triage Description">
<READONLY not="[Project]\Triage Committee" />
</FIELD>
Update
You can also add some restriction during the transition of two state. Please see below steps and screenshot for more info.
Detail steps:
Open the Work Item Type from server(need tfs power pools)
Right click the transition select 'open details'
Select for or not, add the owner to a group, if you select this group. The user in this group can only be allowed to updated the state field.
I created a new field in our bug template that has values like A,B,C,D. Now I’d like to set permissions for that specific field so that only one group of TFS users can update it while others see it as read=only. Is something like this possible?
You can do this by editing the Work Item Type definition and edit your field. Switch to the Rules tab and add a "ReadOnly" rule. For this rule, insert the allowed group in the Not textbox, so this rule will not be taken into consideration for them (example for Description field):
<FieldDefinition name="Description" refname="System.Description" type="HTML">
<READONLY not="[Project]\AllowedGroup" />
</FieldDefinition>
I'm introducing TFS 2010 in our company.
After a lot of work on item customizations, I'm considering using custom fields as some system fields.
One example...
I've got some management requirements for the field "System.priority". This field should be set to "REQUIRED", so everyone has to do an estimation about the priority of a bug or task.
Are there any well known problems with creating an custom mypriority field and using it? (except the whole customizing afterwards for the basic reports...)
I know i cant delete the system fields but i can delete the references for system.priority from the layout tab and then im going to use my own customized ones ..
Is this possible?
Avoid creating custom fields when the default ones can serve the purpose. E.g.: Use the REQUIRED rule where needed:
<FIELD name="Priority" refname="Microsoft.VSTS.Common.Priority" type="Integer" reportable="dimension">
<REQUIRED />
</FIELD>