How to show product default code (internal reference) in Pos Odoo - odoo-12

I want to show product default code in pos odoo like be [code] product_name. Can I inherit or edit in models.js or from other ?

Related

Symfony 6 - how to use CollectionType Field

Config : Symfony 6.1, PHP 8.1.4, Xampp
I have 3 entities: Carousel, Picture and CarouselPicture.
CarouselPicture is the entity created to make a join table in the ManyToMany relationship with attribute that exists between Carousel and Picture. For each entity there is a FormType.
In my CarouselType (the form for Carousel), I would like to dynamically add fields from CarouselPictureType.
After reading the docs, I understand that you can add a CollectionType... except I can't get it to work.
I probably missed something somewhere but I can't find it.
What I did (cf CarouselType) does not return an error but does not create the fields in question as can be seen below : https://i.stack.imgur.com/g0PUT.png
Here are the files involved in the problem
CarouselType : https://sharemycode.io/c/6ff7150
CarouselPictureType : https://sharemycode.io/c/f6edfab
Entity Carousel : https://sharemycode.io/c/a10ffac
Entity CarouselPicture https://sharemycode.io/c/97021c7
The Twig view of the Carousel form (in the comment an illustration of the output I would like to obtain) :
https://sharemycode.io/c/85235bf

Laravel Backpack PageManager - Can't add page (Field 'template' doesn't have a default value)

Trying to add a new page in a Laravel BackPack project, using the PageManager addon gives the following error:
SQLSTATE[HY000]: General error: 1364 Field 'template' doesn't have a default value
Expanding the Ignition error message shows the following:
INSERT INTO
`pages` (
`name`,
`title`,
`slug`,
`content`,
`extras`,
`updated_at`,
`created_at`
)
VALUES
(
dghj,
fghj,
fghj,
?,
{ "meta_title": NULL,
"meta_description": NULL,
"meta_keywords": NULL },
2022 -09 -12 16: 19: 59,
2022 -09 -12 16: 19: 59
)
...there's no sign of a template in this query but (I believe) it should be added by the PageManager addon so isn't something I have control of.
None of the frames in Ignition show files I've worked on, they're all illuminate or vendor files, however I've set up a new base app containing Laravel, Backpack and Backpack PageManager only, which works as expected so I don't think this is a bug in a package. I'm at a loss as to what I've done wrong or how to go about finding/resolving the problem.
Further info:
Selecting a template in the CRUD view DOES prompt the JS pop-up 'Are you sure you want to update the page template', confirming DOES update the URL to include the GET parameter e.g. [domain]/admin/page/create?template=standard
PHP Version: 8.1.9
Backpack version: 5.3.12
I also have the MenuCRUD addon installed which is reliant upon PageManager and is working as expected.
I managed to find the issue.
For whatever reason a view had been published to resources\views\vendor\backpack\crud\fields\select_page_template.blade.php
This file included:
<select class="form-control" id="select_template" name="select_template" ... >
Changing the name to 'template' resolved the issue:
<select class="form-control" id="select_template" name="template" ... >
Neither of these variations match what's in the original version of the file here, which doesn't even include a name attribute on the input. I'm not sure why mine does, but is all seems to be working now so I'll let sleeping dogs lie and leave this page up in case it benefits anybody else.

Orange invalid flags for attribute k

I am trying to import my tab delimited data set in Orange Canvas via File widget. For some reason, I keep getting this error invalid flags for attribute k. I could not find anything related on web or Orange documentation. Can someone help?

TYPO3 extension: how to find certain TS setting

I found in typo3 admin side(/typo3), you can have two ways to set up TS,
you can set up through template->root, I think TS here will affect the whole site.
you can set up through template->certain page, it will only affect this page.
So my question is:
If I want to find where(which page) has TS setting such as : code = LIST, how could I do?
Use Web > Template module it has tools, you can for an example use Template Analyzer for the search
Try querying the database in phpMyAdmin or similar. The following looks in Template Setup:
SELECT pid, config, constants
FROM sys_template
WHERE config LIKE '%code = LIST%'
Replace config with constants to look in Template Constants. pid is the page ID.
If it is not set in the TypoScript, it perhaps has been set in the plugin itself. Just check the plugin content element itself.
In the Template module, go to the page where the setting is in effect.
Use the TSOB (Typo Script Object Browser) to search for "list":
This must show you all TS for this page that contains "list".
If you don't see the setting you can run a cmd/ctrl-F Search over the entire results.
You would have to search for "[code] = LIST".
Which will lead you to the following entry:
Hovering over the label will produce the above tooltip. Copy the line number.
Now change to the Template Analyzer. Here, you can click through all cascading templates and search for the line number:
This is definitely the line that sets that value.
From the "Template hierarchy" tree you will easily find the template that contains the setting.

Custom field in backend with new extensions

When I build a new extension with Quickstarter, I customize how the backend with the file ext_tables.php, using this line:
$TCA['tt_content']['types'][$_EXTKEY . '_pi1']['showitem'] = 'CType, header,media;Images';
Where I can add new fields and even rename them. But sometimes I find weird sufixes to each field like, for example, "media;;;;1-1-1" which control other stuff that appear around the controls in the backend.
How can I know what these codes mean?
Have a look at the TCA Documentation there is a description of the types-section ($TCA['tt_content']['types']). In there is a table, where ['showitem'] is explained.
Part 1: Field name reference (Required!)
Part 2: Alternative field label (string or LLL reference)
Part 3: Palette number (referring to an entry in the "palettes" section).
Part 4: Special configuration (split by colon ( : )), e.g. 'nowrap' and 'richtext[(list of keys or *)]' (see “Additional $TCA features”)
Part 5: Form style codes (see “Visual style of TCEforms”)