[FIX] l10n_es_aeat_mod349: origin amount incorrect
[FIX] l10n_es_aeat_mod349: origin amount incorrect

The calculation that was being done until now in the field origin_amount is incorrect since the total of the lines of the invoice to rectify was being added. The correct way is to add all the lines of the invoices of the period where the lines of the invoice to rectify are. Also, we must keep in mind that if there are intermediate periods between the original period and the period where the rectification is taking place, it's necessary to check if there is any rectification of the original period in between these periods. This happens in this way because the right original_amount  will be the value of the total_operation_amount corresponding to the last period found in between the periods

This commit has been based from this OCA/l10n-spain#1579

cubells/l10n-spain,cubells/l10n-spain,cubells/l10n-spain