Where does Odoo product.product taxes_id come from? - odoo-8

I'll like to understand where product.obj.taxes_id at https://github.com/odoo/odoo/blob/8.0/addons/sale/sale.py#L1152 come from. I can't find any reference to it in product.product or sale.order.line or product.template.
Not sure if I'm missing something. Appreciate your help.

Got it. Many2many relation. see for reference

Related

Putting groovy gorm code in config file error?

I am using this, Saving-User-last-login-Time-in-Grails, simple tutorial to add lastLoginTime to User. So, everytime a user logs in, the last signed in date/time is saved to database. I followed the steps, provided in the tutorial, exactly. But end-up getting this error.
No signature of method: groovy.util.ConfigObject.withTransaction() is
applicable for argument types: (Config$_run_closure3_closure11)
values: [Config$_run_closure3_closure11#12fab25]
Looks like the Gorm code, in Config.groovy file, is not respected. Does anyone know, where else should I move the code to solve this problem?
Any help is much appreciated. Thanks.
Try application.groovy, instead. For details, refer registeringCallbackClosures.
For more insight, and other approaches to achieve similar behaviour, see Events.

Default blade directives in Laravel/Lumen

Where can I find the default blade directives folder?
I was looking for the #forelse to take as example, but I couldn't find it.
Does anyone know where they are defined in Lumen/Laravel?
note: I'm using Lumen framework, but I think it's quite similar to Laravel in this question, so I'm tagging both.
EDIT:
Due to the imprecision, I'll explain better my intention.
Basically, I'm creating a directive exactly the same as #forelse, but with 2 or 3 further information.
For that reason, I came to ask about the location since I haven't found by myself.
They're defined in the Illuminate\View\Compilers namespace in the BladeCompiler.
See Illuminate/View/Compilers/BladeCompiler.php
Specifically you'll need the compileForelse method if that's the one you want as an example.

Magento Editng Mage_Adminhtml_Block_Report_Filter_Form

I need to add some more fields into the Sales order report filter (Mage_Adminhtml_Block_Report_Filter_Form) and also into the result grid below the form. I am unable to do so. Can anyone please help me to do this.
Thank You.
To solve this issue, What i am doing is overriding files that are needed for my task and doing. That way is easy to so so.

cakephp 2.1 view associated data across all add.ctp, edit.ctp, view.ctp

I have an "examinations" table, its consultation_id relates to "consulsations" table, which in turn its consulation_id relates to the "patients" table.
Now, when I am in the add.ctp, edit.ctp or view.ctp of the "Examinations" Views I need to pull the "patients" details in so that some patient info can appear as to who the form pertains to as patient.
I have tried joins. Not to say they dont work. I am new to cakephp and I really need help as to how it will appear within the controller and how the view.ctp will display it.
I thought of elements but they are just .ctp files right?
Please if anyone can help regarding this it would be so appreciated. I've been trying to do this now for a week and I know there is something simple I am dont doing or thinking rights about.
So you just want to pull in related data? Pretty simple.
In your ExaminationsController methods.
$patients = $this->Examination->Consultation->Patient->find('all',
array('conditions'=>array('consultation_id'=>$id,'examination_id'=>$e_id)));
Something similar to this, not quite sure on which id you need to pass, as it will depend on how your models are linked up. http://book.cakephp.org/2.0/en/models/retrieving-your-data.html
However, if your models are linked up properly, you should get this data anyway. If not set your models recursion to be higher.
$this->Model->recursive = 2;

Sorting a view by dropdown

Hey, i've been looking around for a ajax dropdown sorter for my Views in Drupal.
Unfortunatly, i haven't found alot of usefull information about this subject.
Can anyone tell me if theres a solution already available or can help me started on a custom module by telling me which hooks i should use?
I had a similar issue. Unfortunately I wasn't able to sort the data from the database which is by far the best way. I was however able to take the data and sort it with PHP using a preprocessor function. Depending on the name of your view, setup a function similar to the following:
function templatename_preprocess_name_of__view(&$vars)
{
//Super sweet sorting code goes here
}
The name of your view needs to follow the name of the template file that it is driven by, if there isn't on you should create one. Make sure to change dashes to underscores in your function name. Hope this is helpful. If you find a way to do it from the DB I'm all ears because that would be super awesome.

Resources