I am currently trying to add a new content type that is editable via the LIMS Setup/Control Panel. The goal is have a custom Purchase Order content.
Control Panel Button:
Listing View:
I have about 90% of it working, but I am having a bit of an issue with the Add Form, and I’m not sure how to address it since it seems to be a weird blend of Dexterity and Archetypes mechanism at the moment…
I have the Bika Listing View for the PurchaseOrderFolder working (added to GenericSetup structure
), and the Add button works, but I cannot get the Date and DataGrid Widgets to work at all. Additionally, the content is created immediately, and then is edited. This creates blank entries every time the Add is cancelled.
I assume the Bika widgets don’t work because this is a Dexterity content type while the Bika widgets are all designed for Archetypes. However, the “Add/Edit Form” itself seems to be Archetypes based or something, because I can’t get any of the Dexterity widgets to work either despite defining them as such…
<object name="PurchaseOrderFolder" meta_type="Dexterity FTI"/>
<object name="PurchaseOrder" meta_type="Dexterity FTI"/>
Looking for any guidance on adding Dexterity content with Date Widgets in an Add-On in Senaite. I can’t tell if I registered the content incorrectly for the system (so it’s using the wrong Add Form), or if I’m importing the wrong Widgets. Tried both:
from plone.app.z3cform.widget import DatetimeFieldWidget
from bika.lims.browser.widgets import DateTimeWidget
Rather than posting all the GS code, here’s the core files I’m working with
PurchaseOrder GenericSetup Type
PurchaseOrder Behavior
PurchaseOrder Content Type