At first. Product Install.
1.
Translations are copied from old modules. You don't have to install_translations.
2.
Utils_CommonDataCommon::new_array('crm_Products_tax_rate', array('24', '9', '5', '0'));
means
array(0 => '24', 1 => '9', 2 => '5', 3 => '0')
in DB stored is key of this array. Not value. There is no such thing as 'default' in field definition - use processing callback, QFfield callback or before set defaults before module display.
Same about products categories. You will get integer as value, because keys in this array are integers.
3.
You've set addon to company with function `Products_addon` from Products_0, but in that function
$rb = $this->init_module('Utils/RecordBrowser','crm_Products','crm_Products_addon');
$rb->set_header_properties(array(
'product_id'=>array('width'=>10),
'category'=>array('width'=>10),
'product_name'=>array('width'=>15),
'active'=>array('width'=>7)
));
$rb->set_defaults(array('crm_products'=>$arg['id'],'tax_rate'=>24));
$this->display_module($rb, array(array('crm_products'=>array($arg['id'])), array('crm_products'=>false, 'active'=>false), array('product name'=>'ASC')
you refer `crm_products` column from your products recordset, but there is no such column. Be aware that your argument $arg holds company record. So you're trying to display your records where your column `crm_products` (that doesn't exist) is set to some company id. In our Assets module is column named `company`. So in addon we choose only assets that are assigned to specific company.
You're setting tax_rate here to wrong value. Refer 2. If you leave your install as it is you should call set_defaults(array('tax_rate' => 0)) to have tax rate set to 24.
About orders i'll write tomorrow, because i'm out of time now.
Best regards,
Adam