django-oscar validation error: attribute cannot be blank - django

Im using the latest django-oscar from the master branch.
I've been tryin to understand how to use oscar, please help me with the problem below.
Using the admin page, first, I add the following Product Attribute
Product class: Base Card
Name: Card Type
Type: Option
Option Group: 'Card Type'
Required: checked
Then I tried adding a new Product with the product class Base Card. Under the Product Attribute Values section, I chose Card Type for the attribute, but no matter what values I inserted under e.g Value Option, text or Integer, I keep receiving the validation error below. Any idea why?
ValidationError at /admin/catalogue/product/add/
[u'cardtype attribute cannot be blank']

I'm afraid I'm not able to recreate your issue.
Did you definitely add options to your Card Type option group?

Related

Programming Error when trying to delete User in Django Admin Panel

I got a web page online and everything works fine. Except when I try do delete a user I get the following error:
{ProgrammingError at /admin/auth/user/
operator does not exist: text = integer
LINE 1: ...OIN "auth_user" ON ("avtimessolver"."employee_id" = "auth_us...
^
HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts.}
I am using Django with nginx, gunicorn and postgresql.
Is there anything wrong with my model? The table avtimessolver is generated by an algorithm where i save the id as names so that Django displays names rather than ids in some queries.
Is there any way to fix this without changeing the table, so that the delete function also accepts user names as input?
Any help is appreciated.

Content migration from one template to another in Sitecore

I want to transfer content of items that belong to one template into another template.
For example, I have 5 fields in first template:
Tags
Image
Download link
Title
Date
and 5 fields in another template:
Type
Picture
Download Text
Title
Date
Here first two fields are different in the both the templates and remaining 3 fields are same.
So I want to migrate content of items that belong to first template to the second template. Also, I would like to highlight second template is a newly created template and currently no item from that template is created. So ultimately I am modifying the template of 100 items.
I tried overriding change template method of sitecore TemplateManager.ChangeTemplate(Item item, TemplateChangeList changes) but it empties the fields rather I want to retain the field data.
If anyone has any idea about this, please help.
I don't think there wouldn't be much difficulty to migrate all contents by changing the template. But, the main issue is that there are a number of page items which have to be changed to another template.
If you do, you can use PowerShellExtension. It takes only 1 second.
You can get the script idea from Sitecore Workflow Is Not Working
A solution is to inhertitance this fields, (using the "Base template" Field).
A other solution is to create your own change template command.
You can found here sample code: http://sitecore.stockpick.nl/nederlands/dialoge-box-in-een-command/ (it is a dutch article)
In code use: item.ChangeTemplate(template); and fill in the new field with the already stored values from the old template.

Dynamics CRM : Subgrid not showing field values

Using : Microsoft Dynamics CRM 2013 On Premise
I am working on Quote customization form. Here we have Products Subgrid by default added.
Also, I have added these last two custom fields in this grid to show.
If you notice here on the grid, Product Name is not displaying.
When I select that particular Line Item, I see product name on "Quote Product" entity form as below.
Below is the screen of my Subgrid set up.
What is missing here, so that it is not displaying Product name on the grid? Can anyone please guide me here?
Thank you,
Mittal.
since that grid is showing a particular view, is it possible that you used the wrong field? Sometimes is getting confusing between title, name or any other property.
I suggest you to open that particular view on the Quote Product list, and see if the product name appears there. If even in the list view the product name is blank you should try to modify the view until you found the field that you want.

How to make a date field to be autopopulated in Siebel CRM Desktop?

Whenever I create a new activity, I need a date field to be autopopulated ( it will be autopopulated but greyed out until and unless a checkbox next to it needs to be checked).
I perform a validation based on the date field, when a new activity is created. since the date field check box is not checked, it is not considering the value for the validation.
Any help or suggestion is appreciated.
Thanks.
Jaya Vignesh.
make use of predefault and postdefault values to populate current-date.
set field Read-only (BC field user property). You can find it under Business Component in object explorer.
Field read-only allows you to make a field read-only based on value of other field from same BC or joined field.
I perform a validation based on the date field, when a new activity is created. since the date field check box is not checked, it is not considering the value for the validation.
This requirement of yours isn't clear what exactly you want to validate. Since you are populating it bydefault, I don't find the significance in validating your own auto-populated data. well yet I provide a suggestion below
There are two types of validations, 1. Using configuration or 2. Using scripting. I am not pretty much sure if it can be achieved with configuration but scripting it is possible by overriding BusComp_presetFieldValue, BusComp_preWriteValue. The first one executed when you populate a field. And the latter one when you commit the record.
I have answer assuming your requirement. Let me know if you have any questions or clarifications required.
You can add the Predefault property of the field to be the following
System: TimeStamp

Subsonic error: Unknown column 't0.CartQuantity' in 'field list'

I added a custom property to a generated class from the database using a partial class and for some reason everytime I query my table it tries to look for the custom property as a column in the database and that's when I get this error, is there a way to tell subsonic that my property is not a column in the database?
I'm using Mysql by the way.
I used the SubsonicIgnore attribute on my property and it fixed the issue.